mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Kernel

Threads by month
  • ----- 2025 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
kernel@openeuler.org

February 2025

  • 56 participants
  • 330 discussions
[PATCH openEuler-1.0-LTS] nfsd: make sure exp active before svc_export_show
by Li Lingfeng 24 Feb '25

24 Feb '25
From: Yang Erkun <yangerkun(a)huawei.com> mainline inclusion from mainline-v6.13-rc1 commit be8f982c369c965faffa198b46060f8853e0f1f0 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBEAMQ CVE: CVE-2024-56558 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- The function `e_show` was called with protection from RCU. This only ensures that `exp` will not be freed. Therefore, the reference count for `exp` can drop to zero, which will trigger a refcount use-after-free warning when `exp_get` is called. To resolve this issue, use `cache_get_rcu` to ensure that `exp` remains active. ------------[ cut here ]------------ refcount_t: addition on 0; use-after-free. WARNING: CPU: 3 PID: 819 at lib/refcount.c:25 refcount_warn_saturate+0xb1/0x120 CPU: 3 UID: 0 PID: 819 Comm: cat Not tainted 6.12.0-rc3+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.1-2.fc37 04/01/2014 RIP: 0010:refcount_warn_saturate+0xb1/0x120 ... Call Trace: <TASK> e_show+0x20b/0x230 [nfsd] seq_read_iter+0x589/0x770 seq_read+0x1e5/0x270 vfs_read+0x125/0x530 ksys_read+0xc1/0x160 do_syscall_64+0x5f/0x170 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: bf18f163e89c ("NFSD: Using exp_get for export getting") Cc: stable(a)vger.kernel.org # 4.20+ Signed-off-by: Yang Erkun <yangerkun(a)huawei.com> Reviewed-by: Jeff Layton <jlayton(a)kernel.org> Signed-off-by: Chuck Lever <chuck.lever(a)oracle.com> Conflicts: fs/nfsd/export.c [Commit ae74136b4bb6 ("SUNRPC: Allow cache lookups to use RCU protection rather than the r/w spinlock") add the definition of cache_get_rcu.] Signed-off-by: Li Lingfeng <lilingfeng3(a)huawei.com> --- fs/nfsd/export.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 170456ba2e0b..20e36bb38554 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -1220,9 +1220,12 @@ static int e_show(struct seq_file *m, void *p) return 0; } - exp_get(exp); + if (!(kref_get_unless_zero(&(&exp->h)->ref))) + return 0; + if (cache_check(cd, &exp->h, NULL)) return 0; + exp_put(exp); return svc_export_show(m, cd, cp); } -- 2.31.1
2 1
0 0
[openeuler:OLK-6.6] BUILD REGRESSION 59e807fc6b29960f736cb1bcf4f323ab1e2bc395
by kernel test robot 23 Feb '25

23 Feb '25
tree/branch: https://gitee.com/openeuler/kernel.git OLK-6.6 branch HEAD: 59e807fc6b29960f736cb1bcf4f323ab1e2bc395 !15170 The QoS feature adapts to the cfs bandwidth throttling Error/Warning ids grouped by kconfigs: recent_errors |-- arm64-allmodconfig | |-- include-linux-fortify-string.h:warning:call-to-__write_overflow_field-declared-with-warning-attribute:detected-write-beyond-size-of-field-(1st-parameter)-maybe-use-struct_group() | |-- mm-dynamic_pool.c:warning:variable-ret-is-uninitialized-when-used-here | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-function-memblock_alloc_range_nid_flags | |-- mm-memcontrol.c:warning:no-previous-prototype-for-function-hisi_oom_recover | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | |-- mm-page_cache_limit.c:warning:no-previous-prototype-for-function-cache_limit_mbytes_sysctl_handler | |-- mm-page_cache_limit.c:warning:no-previous-prototype-for-function-cache_reclaim_enable_handler | |-- mm-page_cache_limit.c:warning:no-previous-prototype-for-function-cache_reclaim_sysctl_handler | |-- mm-share_pool.c:warning:Function-parameter-or-member-node_id-not-described-in-sp_area_alloc | |-- mm-share_pool.c:warning:Function-parameter-or-member-spg_id-not-described-in-mg_sp_unshare | |-- mm-share_pool.c:warning:duplicate-section-name-Return | |-- mm-share_pool.c:warning:expecting-prototype-for-mp_sp_group_id_by_pid().-Prototype-was-for-mg_sp_group_id_by_pid()-instead | |-- mm-share_pool.c:warning:variable-is_hugepage-set-but-not-used | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial |-- arm64-allnoconfig | |-- mm-madvise.c:warning:no-previous-prototype-for-force_swapin_vma | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-memblock_alloc_range_nid_flags | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial |-- arm64-randconfig-001-20250222 | |-- mm-madvise.c:warning:no-previous-prototype-for-force_swapin_vma | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-memblock_alloc_range_nid_flags | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial |-- arm64-randconfig-002-20250222 | |-- mm-madvise.c:warning:no-previous-prototype-for-function-force_swapin_vma | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-function-memblock_alloc_range_nid_flags | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial |-- arm64-randconfig-003-20250222 | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-function-memblock_alloc_range_nid_flags | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial |-- arm64-randconfig-004-20250222 | |-- mm-madvise.c:warning:no-previous-prototype-for-function-force_swapin_vma | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-function-memblock_alloc_range_nid_flags | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial |-- loongarch-allmodconfig | |-- include-trace-stages-init.h:warning:str__bonding__trace_system_name-defined-but-not-used | |-- include-trace-stages-init.h:warning:str__fs__trace_system_name-defined-but-not-used | |-- mm-madvise.c:warning:no-previous-prototype-for-force_swapin_vma | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-memblock_alloc_range_nid_flags | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | |-- mm-page_cache_limit.c:warning:no-previous-prototype-for-cache_limit_mbytes_sysctl_handler | |-- mm-page_cache_limit.c:warning:no-previous-prototype-for-cache_reclaim_enable_handler | |-- mm-page_cache_limit.c:warning:no-previous-prototype-for-cache_reclaim_sysctl_handler | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial |-- loongarch-allnoconfig | |-- mm-madvise.c:warning:no-previous-prototype-for-force_swapin_vma | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-memblock_alloc_range_nid_flags | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial |-- loongarch-allyesconfig | |-- include-trace-stages-init.h:warning:str__bonding__trace_system_name-defined-but-not-used | |-- include-trace-stages-init.h:warning:str__fs__trace_system_name-defined-but-not-used | |-- mm-madvise.c:warning:no-previous-prototype-for-force_swapin_vma | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-memblock_alloc_range_nid_flags | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | |-- mm-page_cache_limit.c:warning:no-previous-prototype-for-cache_limit_mbytes_sysctl_handler | |-- mm-page_cache_limit.c:warning:no-previous-prototype-for-cache_reclaim_enable_handler | |-- mm-page_cache_limit.c:warning:no-previous-prototype-for-cache_reclaim_sysctl_handler | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial |-- loongarch-randconfig-001-20250222 | `-- include-linux-mmzone.h:error:error-Allocator-MAX_ORDER-exceeds-SECTION_SIZE |-- loongarch-randconfig-002-20250222 | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-memblock_alloc_range_nid_flags | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial |-- x86_64-allnoconfig | |-- include-net-tcp.h:linux-kabi.h-is-included-more-than-once. | |-- kismet:WARNING:unmet-direct-dependencies-detected-for-PGP_PRELOAD-when-selected-by-PGP_PRELOAD_PUBLIC_KEYS | |-- mm-madvise.c:warning:no-previous-prototype-for-function-force_swapin_vma | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-function-memblock_alloc_range_nid_flags | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial |-- x86_64-allyesconfig | |-- include-linux-fortify-string.h:warning:call-to-__write_overflow_field-declared-with-warning-attribute:detected-write-beyond-size-of-field-(1st-parameter)-maybe-use-struct_group() | |-- mm-dynamic_pool.c:warning:variable-ret-is-uninitialized-when-used-here | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-function-memblock_alloc_range_nid_flags | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | |-- mm-page_cache_limit.c:warning:no-previous-prototype-for-function-cache_limit_mbytes_sysctl_handler | |-- mm-page_cache_limit.c:warning:no-previous-prototype-for-function-cache_reclaim_enable_handler | |-- mm-page_cache_limit.c:warning:no-previous-prototype-for-function-cache_reclaim_sysctl_handler | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial |-- x86_64-buildonly-randconfig-001-20250222 | |-- mm-madvise.c:warning:no-previous-prototype-for-function-force_swapin_vma | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-function-memblock_alloc_range_nid_flags | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial |-- x86_64-buildonly-randconfig-002-20250222 | |-- mm-madvise.c:warning:no-previous-prototype-for-force_swapin_vma | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-memblock_alloc_range_nid_flags | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial |-- x86_64-buildonly-randconfig-003-20250222 | |-- mm-madvise.c:warning:no-previous-prototype-for-force_swapin_vma | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-memblock_alloc_range_nid_flags | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial |-- x86_64-buildonly-randconfig-004-20250222 | |-- mm-madvise.c:warning:no-previous-prototype-for-function-force_swapin_vma | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-function-memblock_alloc_range_nid_flags | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial |-- x86_64-buildonly-randconfig-005-20250222 | |-- include-linux-psp-hygon.h:warning:no-previous-prototype-for-function-psp_register_cmd_notifier | |-- include-linux-psp-hygon.h:warning:no-previous-prototype-for-function-psp_unregister_cmd_notifier | |-- mm-madvise.c:warning:no-previous-prototype-for-function-force_swapin_vma | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-function-memblock_alloc_range_nid_flags | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial |-- x86_64-buildonly-randconfig-006-20250222 | |-- mm-madvise.c:warning:no-previous-prototype-for-force_swapin_vma | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-memblock_alloc_range_nid_flags | |-- mm-memcontrol.c:warning:mem_cgroup_check_swap_for_v1-defined-but-not-used | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial |-- x86_64-defconfig | |-- mm-madvise.c:warning:no-previous-prototype-for-force_swapin_vma | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-memblock_alloc_range_nid_flags | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial `-- x86_64-randconfig-161-20250223 |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead |-- mm-memblock.c:warning:no-previous-prototype-for-memblock_alloc_range_nid_flags |-- mm-memcontrol.c:warning:mem_cgroup_check_swap_for_v1-defined-but-not-used |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial elapsed time: 828m configs tested: 19 configs skipped: 124 tested configs: arm64 allmodconfig clang-18 arm64 allnoconfig gcc-14.2.0 arm64 randconfig-001-20250222 gcc-14.2.0 arm64 randconfig-002-20250222 clang-21 arm64 randconfig-003-20250222 clang-18 arm64 randconfig-004-20250222 clang-21 loongarch allmodconfig gcc-14.2.0 loongarch allnoconfig gcc-14.2.0 loongarch randconfig-001-20250222 gcc-14.2.0 loongarch randconfig-002-20250222 gcc-14.2.0 x86_64 allnoconfig clang-19 x86_64 allyesconfig clang-19 x86_64 buildonly-randconfig-001-20250222 clang-19 x86_64 buildonly-randconfig-002-20250222 gcc-12 x86_64 buildonly-randconfig-003-20250222 gcc-12 x86_64 buildonly-randconfig-004-20250222 clang-19 x86_64 buildonly-randconfig-005-20250222 clang-19 x86_64 buildonly-randconfig-006-20250222 gcc-12 x86_64 defconfig gcc-11 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2759/2759] cc1: warning: drivers/net/ethernet/bzwx/nce/ne6x_vf: No such file or directory
by kernel test robot 23 Feb '25

23 Feb '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 4d88bf76198b8a462646f7be261586ebb2bbf5f3 commit: 5b3d89af9629848d7a4a4928fd911364e310cb06 [2759/2759] drivers: add Chengdu BeiZhongWangXin Technology N5/N6 Series Network Card Driver config: x86_64-randconfig-101-20250222 (https://download.01.org/0day-ci/archive/20250223/202502230031.3Wt6JhSy-lkp@…) compiler: gcc-11 (Debian 11.3.0-12) 11.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250223/202502230031.3Wt6JhSy-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202502230031.3Wt6JhSy-lkp@intel.com/ All warnings (new ones prefixed by >>): >> cc1: warning: drivers/net/ethernet/bzwx/nce/ne6x_vf: No such file or directory [-Wmissing-include-dirs] drivers/net/ethernet/bzwx/nce/comm/txrx.c:5:10: fatal error: ne6x_trace.h: No such file or directory 5 | #include "ne6x_trace.h" | ^~~~~~~~~~~~~~ compilation terminated. -- >> cc1: warning: drivers/net/ethernet/bzwx/nce/ne6x_vf: No such file or directory [-Wmissing-include-dirs] In file included from drivers/net/ethernet/bzwx/nce/ne6x/ne6x_main.c:14: drivers/net/ethernet/bzwx/nce/ne6x/ne6x.h:35:10: fatal error: reg.h: No such file or directory 35 | #include "reg.h" | ^~~~~~~ compilation terminated. -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1958/1958] include/linux/fortify-string.h:583:4: warning: call to '__write_overflow_field' declared with 'warning' attribute: detected write beyond size of field (1st parameter); maybe use struct_group()?
by kernel test robot 22 Feb '25

22 Feb '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 97a32f076246fcfdb99917daa4daffc96a22e3d9 commit: 165b3cc224374728856b5584455d7ae7f054fbe5 [1958/1958] SCSI: SSSRAID: Support 3SNIC 3S5XX serial RAID/HBA controllers config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20250222/202502221657.bPUaL9Yl-lkp@…) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250222/202502221657.bPUaL9Yl-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202502221657.bPUaL9Yl-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from drivers/scsi/sssraid/sssraid_fw.c:7: In file included from include/linux/pci.h:27: In file included from include/linux/mod_devicetable.h:14: In file included from include/linux/uuid.h:11: In file included from include/linux/string.h:294: >> include/linux/fortify-string.h:583:4: warning: call to '__write_overflow_field' declared with 'warning' attribute: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wattribute-warning] 583 | __write_overflow_field(p_size_field, size); | ^ 1 warning generated. vim +583 include/linux/fortify-string.h a28a6e860c6cf2 Francis Laniel 2021-02-25 527 f68f2ff91512c1 Kees Cook 2021-04-20 528 /* f68f2ff91512c1 Kees Cook 2021-04-20 529 * To make sure the compiler can enforce protection against buffer overflows, f68f2ff91512c1 Kees Cook 2021-04-20 530 * memcpy(), memmove(), and memset() must not be used beyond individual f68f2ff91512c1 Kees Cook 2021-04-20 531 * struct members. If you need to copy across multiple members, please use f68f2ff91512c1 Kees Cook 2021-04-20 532 * struct_group() to create a named mirror of an anonymous struct union. f68f2ff91512c1 Kees Cook 2021-04-20 533 * (e.g. see struct sk_buff.) Read overflow checking is currently only f68f2ff91512c1 Kees Cook 2021-04-20 534 * done when a write overflow is also present, or when building with W=1. f68f2ff91512c1 Kees Cook 2021-04-20 535 * f68f2ff91512c1 Kees Cook 2021-04-20 536 * Mitigation coverage matrix f68f2ff91512c1 Kees Cook 2021-04-20 537 * Bounds checking at: f68f2ff91512c1 Kees Cook 2021-04-20 538 * +-------+-------+-------+-------+ f68f2ff91512c1 Kees Cook 2021-04-20 539 * | Compile time | Run time | f68f2ff91512c1 Kees Cook 2021-04-20 540 * memcpy() argument sizes: | write | read | write | read | f68f2ff91512c1 Kees Cook 2021-04-20 541 * dest source length +-------+-------+-------+-------+ f68f2ff91512c1 Kees Cook 2021-04-20 542 * memcpy(known, known, constant) | y | y | n/a | n/a | f68f2ff91512c1 Kees Cook 2021-04-20 543 * memcpy(known, unknown, constant) | y | n | n/a | V | f68f2ff91512c1 Kees Cook 2021-04-20 544 * memcpy(known, known, dynamic) | n | n | B | B | f68f2ff91512c1 Kees Cook 2021-04-20 545 * memcpy(known, unknown, dynamic) | n | n | B | V | f68f2ff91512c1 Kees Cook 2021-04-20 546 * memcpy(unknown, known, constant) | n | y | V | n/a | f68f2ff91512c1 Kees Cook 2021-04-20 547 * memcpy(unknown, unknown, constant) | n | n | V | V | f68f2ff91512c1 Kees Cook 2021-04-20 548 * memcpy(unknown, known, dynamic) | n | n | V | B | f68f2ff91512c1 Kees Cook 2021-04-20 549 * memcpy(unknown, unknown, dynamic) | n | n | V | V | f68f2ff91512c1 Kees Cook 2021-04-20 550 * +-------+-------+-------+-------+ f68f2ff91512c1 Kees Cook 2021-04-20 551 * f68f2ff91512c1 Kees Cook 2021-04-20 552 * y = perform deterministic compile-time bounds checking f68f2ff91512c1 Kees Cook 2021-04-20 553 * n = cannot perform deterministic compile-time bounds checking f68f2ff91512c1 Kees Cook 2021-04-20 554 * n/a = no run-time bounds checking needed since compile-time deterministic f68f2ff91512c1 Kees Cook 2021-04-20 555 * B = can perform run-time bounds checking (currently unimplemented) f68f2ff91512c1 Kees Cook 2021-04-20 556 * V = vulnerable to run-time overflow (will need refactoring to solve) f68f2ff91512c1 Kees Cook 2021-04-20 557 * f68f2ff91512c1 Kees Cook 2021-04-20 558 */ 54d9469bc515dc Kees Cook 2021-06-24 559 __FORTIFY_INLINE bool fortify_memcpy_chk(__kernel_size_t size, f68f2ff91512c1 Kees Cook 2021-04-20 560 const size_t p_size, f68f2ff91512c1 Kees Cook 2021-04-20 561 const size_t q_size, f68f2ff91512c1 Kees Cook 2021-04-20 562 const size_t p_size_field, f68f2ff91512c1 Kees Cook 2021-04-20 563 const size_t q_size_field, f68f2ff91512c1 Kees Cook 2021-04-20 564 const char *func) a28a6e860c6cf2 Francis Laniel 2021-02-25 565 { a28a6e860c6cf2 Francis Laniel 2021-02-25 566 if (__builtin_constant_p(size)) { f68f2ff91512c1 Kees Cook 2021-04-20 567 /* f68f2ff91512c1 Kees Cook 2021-04-20 568 * Length argument is a constant expression, so we f68f2ff91512c1 Kees Cook 2021-04-20 569 * can perform compile-time bounds checking where fa35198f39571b Kees Cook 2022-09-19 570 * buffer sizes are also known at compile time. f68f2ff91512c1 Kees Cook 2021-04-20 571 */ f68f2ff91512c1 Kees Cook 2021-04-20 572 f68f2ff91512c1 Kees Cook 2021-04-20 573 /* Error when size is larger than enclosing struct. */ fa35198f39571b Kees Cook 2022-09-19 574 if (__compiletime_lessthan(p_size_field, p_size) && fa35198f39571b Kees Cook 2022-09-19 575 __compiletime_lessthan(p_size, size)) a28a6e860c6cf2 Francis Laniel 2021-02-25 576 __write_overflow(); fa35198f39571b Kees Cook 2022-09-19 577 if (__compiletime_lessthan(q_size_field, q_size) && fa35198f39571b Kees Cook 2022-09-19 578 __compiletime_lessthan(q_size, size)) a28a6e860c6cf2 Francis Laniel 2021-02-25 579 __read_overflow2(); f68f2ff91512c1 Kees Cook 2021-04-20 580 f68f2ff91512c1 Kees Cook 2021-04-20 581 /* Warn when write size argument larger than dest field. */ fa35198f39571b Kees Cook 2022-09-19 582 if (__compiletime_lessthan(p_size_field, size)) f68f2ff91512c1 Kees Cook 2021-04-20 @583 __write_overflow_field(p_size_field, size); f68f2ff91512c1 Kees Cook 2021-04-20 584 /* f68f2ff91512c1 Kees Cook 2021-04-20 585 * Warn for source field over-read when building with W=1 f68f2ff91512c1 Kees Cook 2021-04-20 586 * or when an over-write happened, so both can be fixed at f68f2ff91512c1 Kees Cook 2021-04-20 587 * the same time. f68f2ff91512c1 Kees Cook 2021-04-20 588 */ fa35198f39571b Kees Cook 2022-09-19 589 if ((IS_ENABLED(KBUILD_EXTRA_WARN1) || fa35198f39571b Kees Cook 2022-09-19 590 __compiletime_lessthan(p_size_field, size)) && fa35198f39571b Kees Cook 2022-09-19 591 __compiletime_lessthan(q_size_field, size)) f68f2ff91512c1 Kees Cook 2021-04-20 592 __read_overflow2_field(q_size_field, size); a28a6e860c6cf2 Francis Laniel 2021-02-25 593 } f68f2ff91512c1 Kees Cook 2021-04-20 594 /* f68f2ff91512c1 Kees Cook 2021-04-20 595 * At this point, length argument may not be a constant expression, f68f2ff91512c1 Kees Cook 2021-04-20 596 * so run-time bounds checking can be done where buffer sizes are f68f2ff91512c1 Kees Cook 2021-04-20 597 * known. (This is not an "else" because the above checks may only f68f2ff91512c1 Kees Cook 2021-04-20 598 * be compile-time warnings, and we want to still warn for run-time f68f2ff91512c1 Kees Cook 2021-04-20 599 * overflows.) f68f2ff91512c1 Kees Cook 2021-04-20 600 */ f68f2ff91512c1 Kees Cook 2021-04-20 601 f68f2ff91512c1 Kees Cook 2021-04-20 602 /* f68f2ff91512c1 Kees Cook 2021-04-20 603 * Always stop accesses beyond the struct that contains the f68f2ff91512c1 Kees Cook 2021-04-20 604 * field, when the buffer's remaining size is known. 311fb40aa0569a Kees Cook 2022-09-02 605 * (The SIZE_MAX test is to optimize away checks where the buffer f68f2ff91512c1 Kees Cook 2021-04-20 606 * lengths are unknown.) f68f2ff91512c1 Kees Cook 2021-04-20 607 */ 311fb40aa0569a Kees Cook 2022-09-02 608 if ((p_size != SIZE_MAX && p_size < size) || 311fb40aa0569a Kees Cook 2022-09-02 609 (q_size != SIZE_MAX && q_size < size)) f68f2ff91512c1 Kees Cook 2021-04-20 610 fortify_panic(func); 54d9469bc515dc Kees Cook 2021-06-24 611 54d9469bc515dc Kees Cook 2021-06-24 612 /* 54d9469bc515dc Kees Cook 2021-06-24 613 * Warn when writing beyond destination field size. 54d9469bc515dc Kees Cook 2021-06-24 614 * 54d9469bc515dc Kees Cook 2021-06-24 615 * We must ignore p_size_field == 0 for existing 0-element 54d9469bc515dc Kees Cook 2021-06-24 616 * fake flexible arrays, until they are all converted to 54d9469bc515dc Kees Cook 2021-06-24 617 * proper flexible arrays. 54d9469bc515dc Kees Cook 2021-06-24 618 * 9f7d69c5cd2390 Kees Cook 2022-09-19 619 * The implementation of __builtin_*object_size() behaves 54d9469bc515dc Kees Cook 2021-06-24 620 * like sizeof() when not directly referencing a flexible 54d9469bc515dc Kees Cook 2021-06-24 621 * array member, which means there will be many bounds checks 54d9469bc515dc Kees Cook 2021-06-24 622 * that will appear at run-time, without a way for them to be 54d9469bc515dc Kees Cook 2021-06-24 623 * detected at compile-time (as can be done when the destination 54d9469bc515dc Kees Cook 2021-06-24 624 * is specifically the flexible array member). 54d9469bc515dc Kees Cook 2021-06-24 625 * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101832 54d9469bc515dc Kees Cook 2021-06-24 626 */ 54d9469bc515dc Kees Cook 2021-06-24 627 if (p_size_field != 0 && p_size_field != SIZE_MAX && 54d9469bc515dc Kees Cook 2021-06-24 628 p_size != p_size_field && p_size_field < size) 54d9469bc515dc Kees Cook 2021-06-24 629 return true; 54d9469bc515dc Kees Cook 2021-06-24 630 54d9469bc515dc Kees Cook 2021-06-24 631 return false; a28a6e860c6cf2 Francis Laniel 2021-02-25 632 } a28a6e860c6cf2 Francis Laniel 2021-02-25 633 :::::: The code at line 583 was first introduced by commit :::::: f68f2ff91512c199ec24883001245912afc17873 fortify: Detect struct member overflows in memcpy() at compile-time :::::: TO: Kees Cook <keescook(a)chromium.org> :::::: CC: Kees Cook <keescook(a)chromium.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH openEuler-1.0-LTS 0/3] Roll back the setting of nfs superblock s_flags.
by Li Lingfeng 22 Feb '25

22 Feb '25
Roll back the setting of nfs superblock s_flags. Li Lingfeng (3): Revert "nfs: fix the loss of superblock's initialized flags" Revert "nfs: pass flags to second superblock" Revert "nfs: ignore SB_RDONLY when mounting nfs" fs/nfs/internal.h | 2 +- fs/nfs/nfs4super.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) -- 2.31.1
2 4
0 0
[openeuler:OLK-5.10 2759/2759] drivers/net/ethernet/mucse/rnp/rnp_common.h:336:36: warning: suggest braces around empty body in an 'if' statement
by kernel test robot 22 Feb '25

22 Feb '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 4d88bf76198b8a462646f7be261586ebb2bbf5f3 commit: e53494b741272933726616122ea77143d9742631 [2759/2759] drivers: initial support for rnp drivers from Mucse Technology config: x86_64-randconfig-101-20250222 (https://download.01.org/0day-ci/archive/20250222/202502221652.JWQOOFW7-lkp@…) compiler: gcc-11 (Debian 11.3.0-12) 11.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250222/202502221652.JWQOOFW7-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202502221652.JWQOOFW7-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21, from drivers/net/ethernet/mucse/rnp/rnp_tc_u32_parse.h:6, from drivers/net/ethernet/mucse/rnp/rnp_main.c:34: drivers/net/ethernet/mucse/rnp/rnp_common.h: In function '_rnp_skb_dump': >> drivers/net/ethernet/mucse/rnp/rnp_common.h:336:36: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] 336 | &dev->features); | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:23: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:13: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:23: warning: variable 'has_trans' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:14: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_main.c: At top level: >> drivers/net/ethernet/mucse/rnp/rnp_main.c:174:6: warning: no previous prototype for 'rnp_unmap_and_free_tx_resource' [-Wmissing-prototypes] 174 | void rnp_unmap_and_free_tx_resource(struct rnp_ring *ring, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_main.c:669:5: warning: no previous prototype for 'rnp_rx_ring_reinit' [-Wmissing-prototypes] 669 | int rnp_rx_ring_reinit(struct rnp_adapter *adapter, | ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_main.c: In function 'rnp_clean_rx_irq': drivers/net/ethernet/mucse/rnp/rnp_main.c:1777:14: warning: variable 'xdp_xmit' set but not used [-Wunused-but-set-variable] 1777 | bool xdp_xmit = false; | ^~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_main.c: At top level: >> drivers/net/ethernet/mucse/rnp/rnp_main.c:2012:6: warning: no previous prototype for 'rnp_write_eitr_rx' [-Wmissing-prototypes] 2012 | void rnp_write_eitr_rx(struct rnp_q_vector *q_vector) | ^~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_main.c:3152:6: warning: no previous prototype for 'rnp_vlan_stags_flag' [-Wmissing-prototypes] 3152 | void rnp_vlan_stags_flag(struct rnp_adapter *adapter) | ^~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_main.c:3558:5: warning: no previous prototype for 'rnp_xmit_nop_frame_ring' [-Wmissing-prototypes] 3558 | int rnp_xmit_nop_frame_ring(struct rnp_adapter *adapter, | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_main.c:4811:6: warning: no previous prototype for 'rnp_service_timer' [-Wmissing-prototypes] 4811 | void rnp_service_timer(struct timer_list *t) | ^~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mucse/rnp/rnp_main.c:4919:6: warning: no previous prototype for 'rnp_service_task' [-Wmissing-prototypes] 4919 | void rnp_service_task(struct work_struct *work) | ^~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mucse/rnp/rnp_main.c:5941:5: warning: no previous prototype for 'rnp_delete_knode' [-Wmissing-prototypes] 5941 | int rnp_delete_knode(struct net_device *dev, | ^~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_main.c:6030:5: warning: no previous prototype for 'rnp_config_knode' [-Wmissing-prototypes] 6030 | int rnp_config_knode(struct net_device *dev, __be16 protocol, | ^~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_main.c:6089:5: warning: no previous prototype for 'rnp_setup_tc_cls_u32' [-Wmissing-prototypes] 6089 | int rnp_setup_tc_cls_u32(struct net_device *dev, | ^~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mucse/rnp/rnp_main.c:6166:6: warning: no previous prototype for 'rnp_do_reset' [-Wmissing-prototypes] 6166 | void rnp_do_reset(struct net_device *netdev) | ^~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_main.c:6387:6: warning: no previous prototype for 'rnp_clear_udp_tunnel_port' [-Wmissing-prototypes] 6387 | void rnp_clear_udp_tunnel_port(struct rnp_adapter *adapter) | ^~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mucse/rnp/rnp_main.c:6507:6: warning: no previous prototype for 'rnp_assign_netdev_ops' [-Wmissing-prototypes] 6507 | void rnp_assign_netdev_ops(struct net_device *dev) | ^~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mucse/rnp/rnp_main.c:6683:5: warning: no previous prototype for 'rnp_can_rpu_start' [-Wmissing-prototypes] 6683 | int rnp_can_rpu_start(struct rnp_adapter *adapter) | ^~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_main.c: In function 'rnp_request_msix_irqs': >> drivers/net/ethernet/mucse/rnp/rnp_main.c:2402:74: warning: 'snprintf' output may be truncated before the last format character [-Wformat-truncation=] 2402 | sizeof(q_vector->name) - 1, "%s-%s-%d-%d", | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:2401:25: note: 'snprintf' output between 10 and 45 bytes into a destination of size 24 2401 | snprintf(q_vector->name, | ^~~~~~~~~~~~~~~~~~~~~~~~ 2402 | sizeof(q_vector->name) - 1, "%s-%s-%d-%d", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2403 | netdev->name, "TxRx", i, q_vector->v_idx); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21, from drivers/net/ethernet/mucse/rnp/rnp_common.c:10: drivers/net/ethernet/mucse/rnp/rnp_common.h: In function '_rnp_skb_dump': >> drivers/net/ethernet/mucse/rnp/rnp_common.h:336:36: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] 336 | &dev->features); | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:23: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:13: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:23: warning: variable 'has_trans' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:14: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^~~~~~~ -- In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21, from drivers/net/ethernet/mucse/rnp/rnp_lib.c:4: drivers/net/ethernet/mucse/rnp/rnp_common.h: In function '_rnp_skb_dump': >> drivers/net/ethernet/mucse/rnp/rnp_common.h:336:36: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] 336 | &dev->features); | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:23: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:13: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:23: warning: variable 'has_trans' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:14: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_lib.c: At top level: drivers/net/ethernet/mucse/rnp/rnp_lib.c:439:5: warning: no previous prototype for 'rnp_acquire_msix_vectors' [-Wmissing-prototypes] 439 | int rnp_acquire_msix_vectors(struct rnp_adapter *adapter, int vectors) | ^~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mucse/rnp/rnp_lib.c:985:6: warning: no previous prototype for 'rnp_print_ring_info' [-Wmissing-prototypes] 985 | void rnp_print_ring_info(struct rnp_adapter *adapter) | ^~~~~~~~~~~~~~~~~~~ -- In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21, from drivers/net/ethernet/mucse/rnp/rnp_n10.c:8: drivers/net/ethernet/mucse/rnp/rnp_common.h: In function '_rnp_skb_dump': >> drivers/net/ethernet/mucse/rnp/rnp_common.h:336:36: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] 336 | &dev->features); | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:23: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:13: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:23: warning: variable 'has_trans' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:14: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c: At top level: drivers/net/ethernet/mucse/rnp/rnp_n10.c:122:5: warning: no previous prototype for 'rnp_eth_set_rar_n10' [-Wmissing-prototypes] 122 | s32 rnp_eth_set_rar_n10(struct rnp_eth_info *eth, u32 index, u8 *addr, | ^~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mucse/rnp/rnp_n10.c:179:5: warning: no previous prototype for 'rnp_eth_clear_rar_n10' [-Wmissing-prototypes] 179 | s32 rnp_eth_clear_rar_n10(struct rnp_eth_info *eth, u32 index) | ^~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mucse/rnp/rnp_n10.c:214:5: warning: no previous prototype for 'rnp_eth_set_vmdq_n10' [-Wmissing-prototypes] 214 | s32 rnp_eth_set_vmdq_n10(struct rnp_eth_info *eth, u32 rar, u32 vmdq) | ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:244:5: warning: no previous prototype for 'rnp_eth_clear_vmdq_n10' [-Wmissing-prototypes] 244 | s32 rnp_eth_clear_vmdq_n10(struct rnp_eth_info *eth, u32 rar, u32 vmdq) | ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mucse/rnp/rnp_n10.c:328:5: warning: no previous prototype for 'rnp_addr_list_itr' [-Wmissing-prototypes] 328 | u8 *rnp_addr_list_itr(struct rnp_hw __maybe_unused *hw, u8 **mc_addr_ptr) | ^~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mucse/rnp/rnp_n10.c:359:5: warning: no previous prototype for 'rnp_eth_update_mc_addr_list_n10' [-Wmissing-prototypes] 359 | s32 rnp_eth_update_mc_addr_list_n10(struct rnp_eth_info *eth, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:442:6: warning: no previous prototype for 'rnp_eth_clr_mc_addr_n10' [-Wmissing-prototypes] 442 | void rnp_eth_clr_mc_addr_n10(struct rnp_eth_info *eth) | ^~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mucse/rnp/rnp_n10.c:457:6: warning: no previous prototype for 'rnp_eth_update_rss_key_n10' [-Wmissing-prototypes] 457 | void rnp_eth_update_rss_key_n10(struct rnp_eth_info *eth, bool sriov_flag) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:486:6: warning: no previous prototype for 'rnp_eth_update_rss_table_n10' [-Wmissing-prototypes] 486 | void rnp_eth_update_rss_table_n10(struct rnp_eth_info *eth) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:511:5: warning: no previous prototype for 'rnp_eth_set_vfta_n10' [-Wmissing-prototypes] 511 | s32 rnp_eth_set_vfta_n10(struct rnp_eth_info *eth, u32 vlan, bool vlan_on) | ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:551:6: warning: no previous prototype for 'rnp_eth_clr_vfta_n10' [-Wmissing-prototypes] 551 | void rnp_eth_clr_vfta_n10(struct rnp_eth_info *eth) | ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:577:5: warning: no previous prototype for 'rnp_layer2_pritologic_n10' [-Wmissing-prototypes] 577 | u16 rnp_layer2_pritologic_n10(u16 hw_id) | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:582:6: warning: no previous prototype for 'rnp_eth_set_layer2_n10' [-Wmissing-prototypes] 582 | void rnp_eth_set_layer2_n10(struct rnp_eth_info *eth, | ^~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:608:6: warning: no previous prototype for 'rnp_eth_clr_layer2_n10' [-Wmissing-prototypes] 608 | void rnp_eth_clr_layer2_n10(struct rnp_eth_info *eth, u16 pri_id) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:616:6: warning: no previous prototype for 'rnp_eth_clr_all_layer2_n10' [-Wmissing-prototypes] 616 | void rnp_eth_clr_all_layer2_n10(struct rnp_eth_info *eth) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:624:5: warning: no previous prototype for 'rnp_tuple5_pritologic_n10' [-Wmissing-prototypes] 624 | u16 rnp_tuple5_pritologic_n10(u16 hw_id) | ^~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mucse/rnp/rnp_n10.c:629:5: warning: no previous prototype for 'rnp_tuple5_pritologic_tcam_n10' [-Wmissing-prototypes] 629 | u16 rnp_tuple5_pritologic_tcam_n10(u16 pri_id) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mucse/rnp/rnp_n10.c:644:6: warning: no previous prototype for 'rnp_eth_set_tuple5_n10' [-Wmissing-prototypes] 644 | void rnp_eth_set_tuple5_n10(struct rnp_eth_info *eth, | ^~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:829:6: warning: no previous prototype for 'rnp_eth_clr_tuple5_n10' [-Wmissing-prototypes] 829 | void rnp_eth_clr_tuple5_n10(struct rnp_eth_info *eth, u16 pri_id) | ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mucse/rnp/rnp_n10.c:853:6: warning: no previous prototype for 'rnp_eth_clr_all_tuple5_n10' [-Wmissing-prototypes] 853 | void rnp_eth_clr_all_tuple5_n10(struct rnp_eth_info *eth) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mucse/rnp/rnp_n10.c:886:6: warning: no previous prototype for 'rnp_eth_set_tcp_sync_n10' [-Wmissing-prototypes] 886 | void rnp_eth_set_tcp_sync_n10(struct rnp_eth_info *eth, int queue, | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:1132:5: warning: no previous prototype for 'rnp_init_hw_ops_n10' [-Wmissing-prototypes] 1132 | s32 rnp_init_hw_ops_n10(struct rnp_hw *hw) | ^~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:1146:5: warning: no previous prototype for 'rnp_get_permtion_mac_addr_n10' [-Wmissing-prototypes] 1146 | s32 rnp_get_permtion_mac_addr_n10(struct rnp_hw *hw, u8 *mac_addr) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:1156:5: warning: no previous prototype for 'rnp_reset_hw_ops_n10' [-Wmissing-prototypes] 1156 | s32 rnp_reset_hw_ops_n10(struct rnp_hw *hw) | ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:1230:5: warning: no previous prototype for 'rnp_start_hw_ops_n10' [-Wmissing-prototypes] 1230 | s32 rnp_start_hw_ops_n10(struct rnp_hw *hw) | ^~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mucse/rnp/rnp_n10.c:1849:5: warning: no previous prototype for 'rnp_check_mac_link_hw_ops_n10' [-Wmissing-prototypes] 1849 | s32 rnp_check_mac_link_hw_ops_n10(struct rnp_hw *hw, rnp_link_speed *speed, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:1874:5: warning: no previous prototype for 'rnp_setup_mac_link_hw_ops_n10' [-Wmissing-prototypes] 1874 | s32 rnp_setup_mac_link_hw_ops_n10(struct rnp_hw *hw, u32 adv, u32 autoneg, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:2017:6: warning: no previous prototype for 'rnp_clean_link_hw_ops_n10' [-Wmissing-prototypes] 2017 | void rnp_clean_link_hw_ops_n10(struct rnp_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mucse/rnp/rnp_n10.c:2800:5: warning: no previous prototype for 'rnp10_get_link_ksettings' [-Wmissing-prototypes] 2800 | int rnp10_get_link_ksettings(struct net_device *netdev, | ^~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mucse/rnp/rnp_n10.c:2998:5: warning: no previous prototype for 'rnp10_set_link_ksettings' [-Wmissing-prototypes] 2998 | int rnp10_set_link_ksettings(struct net_device *netdev, | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c: In function 'rnp10_set_link_ksettings': drivers/net/ethernet/mucse/rnp/rnp_n10.c:3005:39: warning: variable 'duplex_changed' set but not used [-Wunused-but-set-variable] 3005 | bool autoneg_changed = false, duplex_changed = false; | ^~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:3005:14: warning: variable 'autoneg_changed' set but not used [-Wunused-but-set-variable] 3005 | bool autoneg_changed = false, duplex_changed = false; | ^~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c: At top level: drivers/net/ethernet/mucse/rnp/rnp_n10.c:3244:5: warning: no previous prototype for 'rnp_nway_reset' [-Wmissing-prototypes] 3244 | int rnp_nway_reset(struct net_device *netdev) | ^~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:3264:6: warning: no previous prototype for 'rnp_device_supports_autoneg_fc' [-Wmissing-prototypes] 3264 | bool rnp_device_supports_autoneg_fc(struct rnp_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c: In function 'rnp10_get_strings': drivers/net/ethernet/mucse/rnp/rnp_n10.c:3385:13: warning: variable 'dma_ch' set but not used [-Wunused-but-set-variable] 3385 | u32 dma_ch; | ^~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c: In function 'rnp10_get_ethtool_stats': drivers/net/ethernet/mucse/rnp/rnp_n10.c:3739:21: warning: variable 'idx' set but not used [-Wunused-but-set-variable] 3739 | int idx; | ^~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c: At top level: drivers/net/ethernet/mucse/rnp/rnp_n10.c:3928:6: warning: no previous prototype for 'rnp_set_ethtool_hw_ops_n10' [-Wmissing-prototypes] 3928 | void rnp_set_ethtool_hw_ops_n10(struct net_device *netdev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mucse/rnp/rnp_n10.c:3938:5: warning: no previous prototype for 'rnp_get_thermal_sensor_data_hw_ops_n10' [-Wmissing-prototypes] 3938 | s32 rnp_get_thermal_sensor_data_hw_ops_n10(struct rnp_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:3954:5: warning: no previous prototype for 'rnp_init_thermal_sensor_thresh_hw_ops_n10' [-Wmissing-prototypes] 3954 | s32 rnp_init_thermal_sensor_thresh_hw_ops_n10(struct rnp_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:3968:5: warning: no previous prototype for 'rnp_phy_read_reg_hw_ops_n10' [-Wmissing-prototypes] 3968 | s32 rnp_phy_read_reg_hw_ops_n10(struct rnp_hw *hw, u32 reg_addr, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:3980:5: warning: no previous prototype for 'rnp_phy_write_reg_hw_ops_n10' [-Wmissing-prototypes] 3980 | s32 rnp_phy_write_reg_hw_ops_n10(struct rnp_hw *hw, u32 reg_addr, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:3990:6: warning: no previous prototype for 'rnp_set_vf_vlan_mode_hw_ops_n10' [-Wmissing-prototypes] 3990 | void rnp_set_vf_vlan_mode_hw_ops_n10(struct rnp_hw *hw, u16 vlan, int vf, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_n10.c:4128:5: warning: no previous prototype for 'rnp_mac_fc_mode_n10' [-Wmissing-prototypes] 4128 | s32 rnp_mac_fc_mode_n10(struct rnp_mac_info *mac) | ^~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mucse/rnp/rnp_n10.c:4215:6: warning: no previous prototype for 'rnp_mac_set_mac_n10' [-Wmissing-prototypes] 4215 | void rnp_mac_set_mac_n10(struct rnp_mac_info *mac, u8 *addr, int index) | ^~~~~~~~~~~~~~~~~~~ -- In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21, from drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c:9: drivers/net/ethernet/mucse/rnp/rnp_common.h: In function '_rnp_skb_dump': >> drivers/net/ethernet/mucse/rnp/rnp_common.h:336:36: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] 336 | &dev->features); | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:23: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:13: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:23: warning: variable 'has_trans' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:14: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c: In function 'rnp_mbx_get_temp': drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c:1100:13: warning: variable 'err' set but not used [-Wunused-but-set-variable] 1100 | int err; | ^~~ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c: At top level: >> drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c:1136:5: warning: no previous prototype for 'rnp_fw_reg_read' [-Wmissing-prototypes] 1136 | int rnp_fw_reg_read(struct rnp_hw *hw, int addr, int sz) | ^~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c: In function 'rnp_fw_reg_read': drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c:1140:13: warning: variable 'value' set but not used [-Wunused-but-set-variable] 1140 | int value; | ^~~~~ .. vim +/if +336 drivers/net/ethernet/mucse/rnp/rnp_common.h 287 288 #ifndef NO_SKB_DUMP 289 static inline void _rnp_skb_dump(const struct sk_buff *skb, bool full_pkt) 290 { 291 static atomic_t can_dump_full = ATOMIC_INIT(5); 292 #ifdef DEBUG 293 struct skb_shared_info *sh = skb_shinfo(skb); 294 #endif 295 struct net_device *dev = skb->dev; 296 //struct sock *sk = skb->sk; 297 struct sk_buff *list_skb; 298 bool has_mac, has_trans; 299 int headroom, tailroom; 300 int i, len, seg_len; 301 const char *level = KERN_WARNING; 302 303 if (full_pkt) 304 full_pkt = atomic_dec_if_positive(&can_dump_full) >= 0; 305 306 if (full_pkt) 307 len = skb->len; 308 else 309 len = min_t(int, skb->len, MAX_HEADER + 128); 310 311 headroom = skb_headroom(skb); 312 tailroom = skb_tailroom(skb); 313 314 has_mac = skb_mac_header_was_set(skb); 315 has_trans = skb_transport_header_was_set(skb); 316 317 dbg("%sskb len=%u headroom=%u headlen=%u tailroom=%u\n" 318 "mac=(%d,%d) net=(%d,%d) trans=%d\n" 319 "shinfo(txflags=%u nr_frags=%u gso(size=%hu type=%u segs=%hu))\n" 320 "csum(0x%x ip_summed=%u complete_sw=%u valid=%u level=%u)\n" 321 "hash(0x%x sw=%u l4=%u) proto=0x%04x pkttype=%u iif=%d\n", 322 level, skb->len, headroom, skb_headlen(skb), tailroom, 323 has_mac ? skb->mac_header : -1, 324 has_mac ? (skb->network_header - skb->mac_header) : -1, 325 skb->network_header, 326 has_trans ? skb_network_header_len(skb) : -1, 327 has_trans ? skb->transport_header : -1, sh->tx_flags, 328 sh->nr_frags, sh->gso_size, sh->gso_type, sh->gso_segs, 329 skb->csum, skb->ip_summed, skb->csum_complete_sw, 330 skb->csum_valid, skb->csum_level, skb->hash, skb->sw_hash, 331 skb->l4_hash, ntohs(skb->protocol), skb->pkt_type, 332 skb->skb_iif); 333 334 if (dev) 335 dbg("%sdev name=%s feat=0x%pNF\n", level, dev->name, > 336 &dev->features); 337 338 //if (full_pkt && headroom) 339 // print_hex_dump(level, "skb headroom: ", 340 // DUMP_PREFIX_OFFSET, 341 // 16, 1, skb->head, headroom, false); 342 343 seg_len = min_t(int, skb_headlen(skb), len); 344 if (seg_len) 345 print_hex_dump(level, "skb linear: ", DUMP_PREFIX_OFFSET, 346 16, 1, skb->data, seg_len, false); 347 len -= seg_len; 348 349 // if (full_pkt && tailroom) 350 // print_hex_dump(level, "skb tailroom: ", 351 // DUMP_PREFIX_OFFSET, 352 // 16, 1, skb_tail_pointer(skb), tailroom, false); 353 354 for (i = 0; len && i < skb_shinfo(skb)->nr_frags; i++) { 355 skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; 356 //u32 p_off, p_len, copied; 357 u32 p_len; 358 struct page *p; 359 u8 *vaddr; 360 361 p = skb_frag_address(frag); 362 p_len = skb_frag_size(frag); 363 seg_len = min_t(int, p_len, len); 364 vaddr = kmap_atomic(p); 365 print_hex_dump(level, "skb frag: ", DUMP_PREFIX_OFFSET, 366 16, 1, vaddr, seg_len, false); 367 kunmap_atomic(vaddr); 368 len -= seg_len; 369 if (!len) 370 break; 371 } 372 373 if (full_pkt && skb_has_frag_list(skb)) { 374 dbg("skb fraglist:\n"); 375 skb_walk_frags(skb, list_skb) 376 _rnp_skb_dump(list_skb, true); 377 } 378 } 379 #endif 380 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1963/1963] include/linux/mmzone.h:1788:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE
by kernel test robot 22 Feb '25

22 Feb '25
Hi zhangtianyang, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 97a32f076246fcfdb99917daa4daffc96a22e3d9 commit: c93eb12529e21dbb59796132f4fdf75fad4eddaf [1963/1963] LoongArch: Adapted SECTION_SIZE_BITS with page size config: loongarch-randconfig-001-20250222 (https://download.01.org/0day-ci/archive/20250222/202502221546.vr9bH9ug-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250222/202502221546.vr9bH9ug-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202502221546.vr9bH9ug-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from include/linux/gfp.h:7, from include/linux/mm.h:7, from arch/loongarch/kernel/asm-offsets.c:9: >> include/linux/mmzone.h:1788:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE 1788 | #error Allocator MAX_ORDER exceeds SECTION_SIZE | ^~~~~ arch/loongarch/kernel/asm-offsets.c:18:6: warning: no previous prototype for 'output_ptreg_defines' [-Wmissing-prototypes] 18 | void output_ptreg_defines(void) | ^~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/asm-offsets.c:65:6: warning: no previous prototype for 'output_task_defines' [-Wmissing-prototypes] 65 | void output_task_defines(void) | ^~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/asm-offsets.c:80:6: warning: no previous prototype for 'output_thread_info_defines' [-Wmissing-prototypes] 80 | void output_thread_info_defines(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/asm-offsets.c:96:6: warning: no previous prototype for 'output_thread_defines' [-Wmissing-prototypes] 96 | void output_thread_defines(void) | ^~~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/asm-offsets.c:132:6: warning: no previous prototype for 'output_thread_fpu_defines' [-Wmissing-prototypes] 132 | void output_thread_fpu_defines(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/asm-offsets.c:173:6: warning: no previous prototype for 'output_thread_lbt_defines' [-Wmissing-prototypes] 173 | void output_thread_lbt_defines(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/asm-offsets.c:183:6: warning: no previous prototype for 'output_mm_defines' [-Wmissing-prototypes] 183 | void output_mm_defines(void) | ^~~~~~~~~~~~~~~~~ arch/loongarch/kernel/asm-offsets.c:215:6: warning: no previous prototype for 'output_sc_defines' [-Wmissing-prototypes] 215 | void output_sc_defines(void) | ^~~~~~~~~~~~~~~~~ arch/loongarch/kernel/asm-offsets.c:223:6: warning: no previous prototype for 'output_signal_defines' [-Wmissing-prototypes] 223 | void output_signal_defines(void) | ^~~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/asm-offsets.c:261:6: warning: no previous prototype for 'output_smpboot_defines' [-Wmissing-prototypes] 261 | void output_smpboot_defines(void) | ^~~~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/asm-offsets.c:294:6: warning: no previous prototype for 'output_kvm_defines' [-Wmissing-prototypes] 294 | void output_kvm_defines(void) | ^~~~~~~~~~~~~~~~~~ make[3]: *** [scripts/Makefile.build:116: arch/loongarch/kernel/asm-offsets.s] Error 1 shuffle=1637967642 make[3]: Target 'prepare' not remade because of errors. make[2]: *** [Makefile:1202: prepare0] Error 2 shuffle=1637967642 make[2]: Target 'prepare' not remade because of errors. make[1]: *** [Makefile:234: __sub-make] Error 2 shuffle=1637967642 make[1]: Target 'prepare' not remade because of errors. make: *** [Makefile:234: __sub-make] Error 2 shuffle=1637967642 make: Target 'prepare' not remade because of errors. vim +1788 include/linux/mmzone.h d41dee369bff3b Andy Whitcroft 2005-06-23 1783 835c134ec4dd75 Mel Gorman 2007-10-16 1784 #define SECTION_BLOCKFLAGS_BITS \ d9c2340052278d Mel Gorman 2007-10-16 1785 ((1UL << (PFN_SECTION_SHIFT - pageblock_order)) * NR_PAGEBLOCK_BITS) 835c134ec4dd75 Mel Gorman 2007-10-16 1786 23baf831a32c04 Kirill A. Shutemov 2023-03-15 1787 #if (MAX_ORDER + PAGE_SHIFT) > SECTION_SIZE_BITS d41dee369bff3b Andy Whitcroft 2005-06-23 @1788 #error Allocator MAX_ORDER exceeds SECTION_SIZE d41dee369bff3b Andy Whitcroft 2005-06-23 1789 #endif d41dee369bff3b Andy Whitcroft 2005-06-23 1790 :::::: The code at line 1788 was first introduced by commit :::::: d41dee369bff3b9dcb6328d4d822926c28cc2594 [PATCH] sparsemem memory model :::::: TO: Andy Whitcroft <apw(a)shadowen.org> :::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH OLK-6.6] scsi: megaraid_sas: Fix for a potential deadlock
by He Yujie 22 Feb '25

22 Feb '25
From: Tomas Henzl <thenzl(a)redhat.com> stable inclusion from stable-v6.6.69 commit f50783148ec98a1d38b87422e2ceaf2380b7b606 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBJC6H CVE: CVE-2024-57807 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit 50740f4dc78b41dec7c8e39772619d5ba841ddd7 ] This fixes a 'possible circular locking dependency detected' warning CPU0 CPU1 ---- ---- lock(&instance->reset_mutex); lock(&shost->scan_mutex); lock(&instance->reset_mutex); lock(&shost->scan_mutex); Fix this by temporarily releasing the reset_mutex. Signed-off-by: Tomas Henzl <thenzl(a)redhat.com> Link: https://lore.kernel.org/r/20240923174833.45345-1-thenzl@redhat.com Acked-by: Chandrakanth Patil <chandrakanth.patil(a)broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen(a)oracle.com> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: He Yujie <coka.heyujie(a)huawei.com> --- drivers/scsi/megaraid/megaraid_sas_base.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 3d4f13da1ae8..4cc93cb79b8b 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -8904,8 +8904,11 @@ megasas_aen_polling(struct work_struct *work) (ld_target_id / MEGASAS_MAX_DEV_PER_CHANNEL), (ld_target_id % MEGASAS_MAX_DEV_PER_CHANNEL), 0); - if (sdev1) + if (sdev1) { + mutex_unlock(&instance->reset_mutex); megasas_remove_scsi_device(sdev1); + mutex_lock(&instance->reset_mutex); + } event_type = SCAN_VD_CHANNEL; break; -- 2.34.1
2 1
0 0
[PATCH OLK-6.6] gfs2: Truncate address space when flipping GFS2_DIF_JDATA flag
by He Yujie 22 Feb '25

22 Feb '25
From: Andreas Gruenbacher <agruenba(a)redhat.com> stable inclusion from stable-v6.6.75 commit 4dd57d1f0e9844311c635a7fb39abce4f2ac5a61 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBLWTC CVE: CVE-2025-21699 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- commit 7c9d9223802fbed4dee1ae301661bf346964c9d2 upstream. Truncate an inode's address space when flipping the GFS2_DIF_JDATA flag: depending on that flag, the pages in the address space will either use buffer heads or iomap_folio_state structs, and we cannot mix the two. Reported-by: Kun Hu <huk23(a)m.fudan.edu.cn>, Jiaji Qin <jjtan24(a)m.fudan.edu.cn> Signed-off-by: Andreas Gruenbacher <agruenba(a)redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: He Yujie <coka.heyujie(a)huawei.com> --- fs/gfs2/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 9296e0e282bc..2adaffa58e88 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c @@ -251,6 +251,7 @@ static int do_gfs2_set_flags(struct inode *inode, u32 reqflags, u32 mask) error = filemap_fdatawait(inode->i_mapping); if (error) goto out; + truncate_inode_pages(inode->i_mapping, 0); if (new_flags & GFS2_DIF_JDATA) gfs2_ordered_del_inode(ip); } -- 2.34.1
2 1
0 0
[openeuler:OLK-6.6 1958/1958] include/linux/fortify-string.h:406:19: warning: writing 1 byte into a region of size 0
by kernel test robot 22 Feb '25

22 Feb '25
Hi Arnd, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 74286da1995dd8a99c67a9fb3cf658d2557f143d commit: 6d4ab2e97dcfbcd748ae71761a9d8e5e41cc732c [1958/1958] extrawarn: enable format and stringop overflow warnings in W=1 :::::: branch date: 3 hours ago :::::: commit date: 1 year, 6 months ago config: x86_64-randconfig-101-20250222 (https://download.01.org/0day-ci/archive/20250222/202502221328.nkA6ehke-lkp@…) compiler: gcc-11 (Debian 11.3.0-12) 11.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250222/202502221328.nkA6ehke-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/r/202502221328.nkA6ehke-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from include/linux/string.h:254, from include/acpi/platform/aclinux.h:52, from include/acpi/platform/acenv.h:160, from include/acpi/acpi.h:22, from drivers/acpi/acpica/nsnames.c:8: In function 'strlcat', inlined from 'strcat' at include/linux/fortify-string.h:432:6, inlined from 'acpi_ns_build_prefixed_pathname' at drivers/acpi/acpica/nsnames.c:378:4: >> include/linux/fortify-string.h:406:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 406 | p[actual] = '\0'; | ~~~~~~~~~~^~~~~~ In file included from include/acpi/platform/aclinux.h:58, from include/acpi/platform/acenv.h:160, from include/acpi/acpi.h:22, from drivers/acpi/acpica/nsnames.c:8: drivers/acpi/acpica/nsnames.c: In function 'acpi_ns_build_prefixed_pathname': include/linux/slab.h:586:16: note: at offset -2 into destination object of size [0, 9223372036854775807] allocated by '__kmalloc' 586 | return __kmalloc(size, flags); | ^~~~~~~~~~~~~~~~~~~~~~ vim +406 include/linux/fortify-string.h a28a6e860c6cf2 Francis Laniel 2021-02-25 346 605395cd7ceded Kees Cook 2023-04-02 347 /* Defined after fortified strlen() to reuse it. */ 605395cd7ceded Kees Cook 2023-04-02 348 extern size_t __real_strlcat(char *p, const char *q, size_t avail) __RENAME(strlcat); 605395cd7ceded Kees Cook 2023-04-02 349 /** 605395cd7ceded Kees Cook 2023-04-02 350 * strlcat - Append a string to an existing string 605395cd7ceded Kees Cook 2023-04-02 351 * 605395cd7ceded Kees Cook 2023-04-02 352 * @p: pointer to %NUL-terminated string to append to 605395cd7ceded Kees Cook 2023-04-02 353 * @q: pointer to %NUL-terminated string to append from 605395cd7ceded Kees Cook 2023-04-02 354 * @avail: Maximum bytes available in @p 605395cd7ceded Kees Cook 2023-04-02 355 * 605395cd7ceded Kees Cook 2023-04-02 356 * Appends %NUL-terminated string @q after the %NUL-terminated 605395cd7ceded Kees Cook 2023-04-02 357 * string at @p, but will not write beyond @avail bytes total, 605395cd7ceded Kees Cook 2023-04-02 358 * potentially truncating the copy from @q. @p will stay 605395cd7ceded Kees Cook 2023-04-02 359 * %NUL-terminated only if a %NUL already existed within 605395cd7ceded Kees Cook 2023-04-02 360 * the @avail bytes of @p. If so, the resulting number of 605395cd7ceded Kees Cook 2023-04-02 361 * bytes copied from @q will be at most "@avail - strlen(@p) - 1". 605395cd7ceded Kees Cook 2023-04-02 362 * 605395cd7ceded Kees Cook 2023-04-02 363 * Do not use this function. While FORTIFY_SOURCE tries to avoid 605395cd7ceded Kees Cook 2023-04-02 364 * read and write overflows, this is only possible when the sizes 605395cd7ceded Kees Cook 2023-04-02 365 * of @p and @q are known to the compiler. Prefer building the 605395cd7ceded Kees Cook 2023-04-02 366 * string with formatting, via scnprintf(), seq_buf, or similar. 605395cd7ceded Kees Cook 2023-04-02 367 * 605395cd7ceded Kees Cook 2023-04-02 368 * Returns total bytes that _would_ have been contained by @p 605395cd7ceded Kees Cook 2023-04-02 369 * regardless of truncation, similar to snprintf(). If return 605395cd7ceded Kees Cook 2023-04-02 370 * value is >= @avail, the string has been truncated. 605395cd7ceded Kees Cook 2023-04-02 371 * 605395cd7ceded Kees Cook 2023-04-02 372 */ 605395cd7ceded Kees Cook 2023-04-02 373 __FORTIFY_INLINE 605395cd7ceded Kees Cook 2023-04-02 374 size_t strlcat(char * const POS p, const char * const POS q, size_t avail) 605395cd7ceded Kees Cook 2023-04-02 375 { 605395cd7ceded Kees Cook 2023-04-02 376 const size_t p_size = __member_size(p); 605395cd7ceded Kees Cook 2023-04-02 377 const size_t q_size = __member_size(q); 605395cd7ceded Kees Cook 2023-04-02 378 size_t p_len, copy_len; 605395cd7ceded Kees Cook 2023-04-02 379 size_t actual, wanted; 605395cd7ceded Kees Cook 2023-04-02 380 605395cd7ceded Kees Cook 2023-04-02 381 /* Give up immediately if both buffer sizes are unknown. */ 605395cd7ceded Kees Cook 2023-04-02 382 if (p_size == SIZE_MAX && q_size == SIZE_MAX) 605395cd7ceded Kees Cook 2023-04-02 383 return __real_strlcat(p, q, avail); 605395cd7ceded Kees Cook 2023-04-02 384 605395cd7ceded Kees Cook 2023-04-02 385 p_len = strnlen(p, avail); 605395cd7ceded Kees Cook 2023-04-02 386 copy_len = strlen(q); 605395cd7ceded Kees Cook 2023-04-02 387 wanted = actual = p_len + copy_len; 605395cd7ceded Kees Cook 2023-04-02 388 605395cd7ceded Kees Cook 2023-04-02 389 /* Cannot append any more: report truncation. */ 605395cd7ceded Kees Cook 2023-04-02 390 if (avail <= p_len) 605395cd7ceded Kees Cook 2023-04-02 391 return wanted; 605395cd7ceded Kees Cook 2023-04-02 392 605395cd7ceded Kees Cook 2023-04-02 393 /* Give up if string is already overflowed. */ 605395cd7ceded Kees Cook 2023-04-02 394 if (p_size <= p_len) 605395cd7ceded Kees Cook 2023-04-02 395 fortify_panic(__func__); 605395cd7ceded Kees Cook 2023-04-02 396 605395cd7ceded Kees Cook 2023-04-02 397 if (actual >= avail) { 605395cd7ceded Kees Cook 2023-04-02 398 copy_len = avail - p_len - 1; 605395cd7ceded Kees Cook 2023-04-02 399 actual = p_len + copy_len; 605395cd7ceded Kees Cook 2023-04-02 400 } 605395cd7ceded Kees Cook 2023-04-02 401 605395cd7ceded Kees Cook 2023-04-02 402 /* Give up if copy will overflow. */ 605395cd7ceded Kees Cook 2023-04-02 403 if (p_size <= actual) 605395cd7ceded Kees Cook 2023-04-02 404 fortify_panic(__func__); 605395cd7ceded Kees Cook 2023-04-02 405 __underlying_memcpy(p + p_len, q, copy_len); 605395cd7ceded Kees Cook 2023-04-02 @406 p[actual] = '\0'; 605395cd7ceded Kees Cook 2023-04-02 407 605395cd7ceded Kees Cook 2023-04-02 408 return wanted; 605395cd7ceded Kees Cook 2023-04-02 409 } 605395cd7ceded Kees Cook 2023-04-02 410 55c84a5cf2c72a Kees Cook 2023-04-04 411 /* Defined after fortified strlcat() to reuse it. */ 55c84a5cf2c72a Kees Cook 2023-04-04 412 /** 55c84a5cf2c72a Kees Cook 2023-04-04 413 * strcat - Append a string to an existing string 55c84a5cf2c72a Kees Cook 2023-04-04 414 * 55c84a5cf2c72a Kees Cook 2023-04-04 415 * @p: pointer to NUL-terminated string to append to 55c84a5cf2c72a Kees Cook 2023-04-04 416 * @q: pointer to NUL-terminated source string to append from 55c84a5cf2c72a Kees Cook 2023-04-04 417 * 55c84a5cf2c72a Kees Cook 2023-04-04 418 * Do not use this function. While FORTIFY_SOURCE tries to avoid 55c84a5cf2c72a Kees Cook 2023-04-04 419 * read and write overflows, this is only possible when the 55c84a5cf2c72a Kees Cook 2023-04-04 420 * destination buffer size is known to the compiler. Prefer 55c84a5cf2c72a Kees Cook 2023-04-04 421 * building the string with formatting, via scnprintf() or similar. 55c84a5cf2c72a Kees Cook 2023-04-04 422 * At the very least, use strncat(). 55c84a5cf2c72a Kees Cook 2023-04-04 423 * 55c84a5cf2c72a Kees Cook 2023-04-04 424 * Returns @p. 55c84a5cf2c72a Kees Cook 2023-04-04 425 * 55c84a5cf2c72a Kees Cook 2023-04-04 426 */ 55c84a5cf2c72a Kees Cook 2023-04-04 427 __FORTIFY_INLINE __diagnose_as(__builtin_strcat, 1, 2) 55c84a5cf2c72a Kees Cook 2023-04-04 428 char *strcat(char * const POS p, const char *q) 55c84a5cf2c72a Kees Cook 2023-04-04 429 { 55c84a5cf2c72a Kees Cook 2023-04-04 430 const size_t p_size = __member_size(p); 55c84a5cf2c72a Kees Cook 2023-04-04 431 55c84a5cf2c72a Kees Cook 2023-04-04 @432 if (strlcat(p, q, p_size) >= p_size) 55c84a5cf2c72a Kees Cook 2023-04-04 433 fortify_panic(__func__); 55c84a5cf2c72a Kees Cook 2023-04-04 434 return p; 55c84a5cf2c72a Kees Cook 2023-04-04 435 } 55c84a5cf2c72a Kees Cook 2023-04-04 436 :::::: The code at line 406 was first introduced by commit :::::: 605395cd7ceded5842c8ba6763ea24feee690c87 fortify: Add protection for strlcat() :::::: TO: Kees Cook <keescook(a)chromium.org> :::::: CC: Kees Cook <keescook(a)chromium.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • ...
  • 33
  • Older →

HyperKitty Powered by HyperKitty