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 -----
  • July
  • June
  • 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

  • 39 participants
  • 19020 discussions
[openeuler:openEuler-1.0-LTS 1418/1418] mm/maccess.c:64:6: warning: no previous prototype for '__probe_user_read'
by kernel test robot 09 Feb '25

09 Feb '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: cc7cb040bd0afe96f1da94c9f21eda5a986510a5 commit: 5c5bac1227aee80ee106ec07b32c981558049304 [1418/1418] uaccess: Add non-pagefault user-space read functions config: x86_64-buildonly-randconfig-001-20250207 (https://download.01.org/0day-ci/archive/20250209/202502090137.3KkiIJ8x-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250209/202502090137.3KkiIJ8x-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/202502090137.3KkiIJ8x-lkp@intel.com/ All warnings (new ones prefixed by >>): >> mm/maccess.c:64:6: warning: no previous prototype for '__probe_user_read' [-Wmissing-prototypes] 64 | long __probe_user_read(void *dst, const void __user *src, size_t size) | ^~~~~~~~~~~~~~~~~ vim +/__probe_user_read +64 mm/maccess.c 50 51 /** 52 * probe_user_read(): safely attempt to read from a user-space location 53 * @dst: pointer to the buffer that shall take the data 54 * @src: address to read from. This must be a user address. 55 * @size: size of the data chunk 56 * 57 * Safely read from user address @src to the buffer at @dst. If a kernel fault 58 * happens, handle that and return -EFAULT. 59 */ 60 61 long __weak probe_user_read(void *dst, const void __user *src, size_t size) 62 __attribute__((alias("__probe_user_read"))); 63 > 64 long __probe_user_read(void *dst, const void __user *src, size_t size) 65 { 66 long ret = -EFAULT; 67 mm_segment_t old_fs = get_fs(); 68 69 set_fs(USER_DS); 70 if (access_ok(src, size)) 71 ret = probe_read_common(dst, src, size); 72 set_fs(old_fs); 73 74 return ret; 75 } 76 EXPORT_SYMBOL_GPL(probe_user_read); 77 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS] BUILD REGRESSION cc7cb040bd0afe96f1da94c9f21eda5a986510a5
by kernel test robot 09 Feb '25

09 Feb '25
tree/branch: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS branch HEAD: cc7cb040bd0afe96f1da94c9f21eda5a986510a5 !15017 spi: mpc52xx: Add cancel_work_sync before module remove Error/Warning (recently discovered and may have been fixed): https://lore.kernel.org/oe-kbuild-all/202502082031.V2tZWUQg-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202502082225.bZGoGhTq-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202502082245.oXwKH6sI-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202502082355.jrzYRRaD-lkp@intel.com include/linux/thread_info.h:59:17: warning: 'ctl' may be used uninitialized [-Wmaybe-uninitialized] include/linux/uaccess.h:115:17: warning: 'from' may be used uninitialized [-Wmaybe-uninitialized] mm/.tmp_ioremap.o: warning: objtool: missing symbol for section .text mm/hugetlb.c:1370:6: warning: no previous prototype for function 'free_huge_page_to_dhugetlb_pool' [-Wmissing-prototypes] mm/kasan/kasan_init.c:328:16: warning: variable 'p4d' set but not used [-Wunused-but-set-variable] mm/memcontrol.c:432:54: warning: array subscript nid is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] mm/memcontrol.c:5375: warning: bad line: | 0, otherwise. Unverified Error/Warning (likely false positive, kindly check if interested): drivers/mtd/spi-nor/fsl-quadspi.c:909:9: sparse: sparse: incorrect type in argument 2 (different address spaces) drivers/usb/mtu3/mtu3_qmu.c:297:26: sparse: sparse: incorrect type in assignment (different base types) kernel/trace/ftrace.c:295:49: sparse: sparse: incorrect type in argument 1 (different address spaces) Error/Warning ids grouped by kconfigs: recent_errors |-- arm64-allmodconfig | |-- block-bio-integrity.c:warning:no-previous-prototype-for-__bio_integrity_free | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-blkg-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-delta-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-now-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-q-not-described-in-blkcg_schedule_throttle | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-use_memdelay-not-described-in-blkcg_schedule_throttle | |-- block-blk-io-hierarchy-iodump.c:warning:no-previous-prototype-for-__bio_stage_hierarchy_start | |-- block-blk-iolatency.c:warning:variable-blkiolat-set-but-not-used | |-- block-blk-iolatency.c:warning:variable-changed-set-but-not-used | |-- block-blk-mq-sched.c:warning:no-previous-prototype-for-__blk_mq_sched_dispatch_requests | |-- block-genhd.c:warning:no-previous-prototype-for-disk_scan_partitions | |-- drivers-net-ethernet-netswift-ngbe-ngbe_main.c:warning:unused-variable-len | |-- include-asm-generic-bitops-non-atomic.h:warning:array-subscript-long-unsigned-int-is-partly-outside-array-bounds-of-u32-aka-unsigned-int | |-- include-linux-kernel.h:warning:comparison-of-distinct-pointer-types-lacks-a-cast | |-- include-linux-thread_info.h:warning:b-may-be-used-uninitialized | |-- include-net-netns-generic.h:warning:array-subscript-id-is-outside-array-bounds-of-void | |-- include-scsi-scsi_cmnd.h:warning:scsi_cmnd-may-be-used-uninitialized | |-- mm-kasan-kasan_init.c:warning:variable-p4d-set-but-not-used | `-- mm-memcontrol.c:warning:array-subscript-nid-is-outside-array-bounds-of-struct-mem_cgroup_per_node |-- arm64-allnoconfig | |-- include-linux-mempolicy.h:warning:__do_mbind-defined-but-not-used | `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled |-- arm64-randconfig-001-20250207 | `-- mm-kasan-kasan_init.c:warning:variable-p4d-set-but-not-used |-- arm64-randconfig-001-20250208 | |-- block-bio-integrity.c:warning:no-previous-prototype-for-__bio_integrity_free | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-blkg-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-delta-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-now-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-q-not-described-in-blkcg_schedule_throttle | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-use_memdelay-not-described-in-blkcg_schedule_throttle | |-- block-blk-iolatency.c:warning:variable-blkiolat-set-but-not-used | |-- block-blk-iolatency.c:warning:variable-changed-set-but-not-used | |-- block-blk-merge.c:warning:no-previous-prototype-for-blk_try_req_merge | |-- block-blk-mq-sched.c:warning:no-previous-prototype-for-__blk_mq_sched_dispatch_requests | |-- block-genhd.c:warning:no-previous-prototype-for-disk_scan_partitions | |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union | |-- include-linux-filter.h:warning:cast-between-incompatible-function-types-from-u64-(-)(u64-u64-u64-u64-u64)-aka-long-long-unsigned-int-(-)(long-long-unsigned-int-long-long-unsigned-int-long-long-unsigne | |-- include-linux-list.h:warning:array-subscript-is-outside-array-bounds-of-struct-plist_node | |-- include-linux-list.h:warning:storing-the-address-of-local-variable-tmp-in-((struct-list_head-)lip)-.prev | |-- include-linux-mempolicy.h:warning:__do_mbind-defined-but-not-used | |-- include-linux-plist.h:warning:array-subscript-is-outside-array-bounds-of-struct-plist_node | `-- include-scsi-scsi_cmnd.h:warning:scsi_cmnd-may-be-used-uninitialized |-- arm64-randconfig-002-20250207 | `-- mm-memcontrol.c:warning:array-subscript-nid-is-outside-array-bounds-of-struct-mem_cgroup_per_node |-- arm64-randconfig-002-20250208 | |-- drivers-gpu-drm-ttm-ttm_object.c:error:Cannot-parse-struct-or-union | |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union | |-- include-linux-filter.h:warning:cast-between-incompatible-function-types-from-u64-(-)(u64-u64-u64-u64-u64)-aka-long-long-unsigned-int-(-)(long-long-unsigned-int-long-long-unsigned-int-long-long-unsigne | |-- include-linux-mempolicy.h:warning:__do_mbind-defined-but-not-used | `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled |-- arm64-randconfig-003-20250208 | |-- drivers-gpu-drm-ttm-ttm_object.c:error:Cannot-parse-struct-or-union | |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union | `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled |-- arm64-randconfig-004-20250208 | |-- drivers-gpu-drm-ttm-ttm_object.c:error:Cannot-parse-struct-or-union | |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union | |-- include-linux-filter.h:warning:cast-between-incompatible-function-types-from-u64-(-)(u64-u64-u64-u64-u64)-aka-long-long-unsigned-int-(-)(long-long-unsigned-int-long-long-unsigned-int-long-long-unsigne | |-- include-linux-mempolicy.h:warning:__do_mbind-defined-but-not-used | `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled |-- arm64-randconfig-r131-20250208 | |-- drivers-mtd-spi-nor-fsl-quadspi.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-const-got-void-noderef-__iomem | |-- drivers-usb-mtu3-mtu3_qmu.c:sparse:sparse:incorrect-type-in-assignment-(different-base-types)-expected-unsigned-char-usertype-rx_ext_addr-got-restricted-__le16-usertype | |-- include-linux-uaccess.h:warning:from-may-be-used-uninitialized | `-- kernel-trace-ftrace.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-struct-ftrace_ops-ops-got-struct-ftrace_ops-noderef-__rcu-static-toplevel-ftrace_ops_list |-- x86_64-allmodconfig | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-blkg-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-delta-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-now-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-q-not-described-in-blkcg_schedule_throttle | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-use_memdelay-not-described-in-blkcg_schedule_throttle | |-- block-blk-iolatency.c:warning:variable-blkiolat-set-but-not-used | |-- block-blk-iolatency.c:warning:variable-changed-set-but-not-used | `-- block-blk-mq-sched.c:warning:no-previous-prototype-for-function-__blk_mq_sched_dispatch_requests |-- x86_64-allnoconfig | |-- arch-x86-entry-entry_64.o:warning:objtool:.entry.text:unsupported-intra-function-call | |-- mm-ioremap.o:warning:objtool:missing-symbol-for-section-.text | `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled-Werror-Wimplicit-function-declaration |-- x86_64-allyesconfig | |-- block-bio-integrity.c:warning:no-previous-prototype-for-function-__bio_integrity_free | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-blkg-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-delta-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-now-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-q-not-described-in-blkcg_schedule_throttle | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-use_memdelay-not-described-in-blkcg_schedule_throttle | |-- block-blk-iolatency.c:warning:variable-blkiolat-set-but-not-used | |-- block-blk-iolatency.c:warning:variable-changed-set-but-not-used | |-- block-blk-mq-sched.c:warning:no-previous-prototype-for-function-__blk_mq_sched_dispatch_requests | |-- block-blk-wbt.c:warning:no-previous-prototype-for-function-wbt_issue | |-- block-blk-wbt.c:warning:no-previous-prototype-for-function-wbt_requeue | |-- block-genhd.c:warning:no-previous-prototype-for-function-disk_scan_partitions | |-- drivers-gpu-drm-ttm-ttm_object.c:error:Cannot-parse-struct-or-union | |-- drivers-net-ethernet-netswift-ngbe-ngbe_main.c:warning:unused-variable-len | `-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union |-- x86_64-buildonly-randconfig-001-20250207 | `-- mm-memcontrol.c:warning:bad-line:otherwise. |-- x86_64-buildonly-randconfig-002-20250208 | |-- arch-x86-entry-entry_64.o:warning:objtool:.entry.text:unsupported-intra-function-call | |-- arch-x86-entry-entry_64.o:warning:objtool:If-this-is-a-retpoline-please-patch-it-in-with-alternatives-and-annotate-it-with-ANNOTATE_NOSPEC_ALTERNATIVE. | |-- drivers-net-ethernet-netswift-ngbe-ngbe_main.c:warning:unused-variable-len | |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union | |-- include-linux-filter.h:warning:cast-between-incompatible-function-types-from-u64-(-)(u64-u64-u64-u64-u64)-aka-long-long-unsigned-int-(-)(long-long-unsigned-int-long-long-unsigned-int-long-long-unsigne | |-- include-linux-kernel.h:warning:comparison-of-distinct-pointer-types-lacks-a-cast | |-- include-linux-mempolicy.h:warning:__do_mbind-defined-but-not-used | |-- include-linux-thread_info.h:warning:ctl-may-be-used-uninitialized | `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled |-- x86_64-buildonly-randconfig-003-20250207 | `-- mm-hugetlb.c:warning:no-previous-prototype-for-function-free_huge_page_to_dhugetlb_pool |-- x86_64-buildonly-randconfig-004-20250207 | `-- mm-.tmp_ioremap.o:warning:objtool:missing-symbol-for-section-.text `-- x86_64-defconfig |-- arch-x86-entry-entry_64.o:warning:objtool:.entry.text:unsupported-intra-function-call |-- arch-x86-entry-entry_64.o:warning:objtool:If-this-is-a-retpoline-please-patch-it-in-with-alternatives-and-annotate-it-with-ANNOTATE_NOSPEC_ALTERNATIVE. |-- block-blk-merge.c:warning:no-previous-prototype-for-blk_try_req_merge |-- block-blk-mq-sched.c:warning:no-previous-prototype-for-__blk_mq_sched_dispatch_requests |-- block-genhd.c:warning:no-previous-prototype-for-disk_scan_partitions |-- include-linux-filter.h:warning:cast-between-incompatible-function-types-from-u64-(-)(u64-u64-u64-u64-u64)-aka-long-long-unsigned-int-(-)(long-long-unsigned-int-long-long-unsigned-int-long-long-unsigne |-- include-linux-kernel.h:warning:comparison-of-distinct-pointer-types-lacks-a-cast `-- mm-ioremap.o:warning:objtool:missing-symbol-for-section-.text elapsed time: 738m configs tested: 10 configs skipped: 108 tested configs: arm64 allmodconfig gcc-14.2.0 arm64 allnoconfig gcc-14.2.0 arm64 randconfig-001-20250208 gcc-14.2.0 arm64 randconfig-002-20250208 gcc-14.2.0 arm64 randconfig-003-20250208 gcc-14.2.0 arm64 randconfig-004-20250208 gcc-14.2.0 x86_64 allnoconfig clang-19 x86_64 allyesconfig clang-19 x86_64 buildonly-randconfig-002-20250208 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:openEuler-1.0-LTS 1421/1421] include/linux/thread_info.h:59:17: warning: 'ctl' may be used uninitialized
by kernel test robot 08 Feb '25

08 Feb '25
Hi Jens, FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: cc7cb040bd0afe96f1da94c9f21eda5a986510a5 commit: c6e864fee7c3dd416048d129997c7def53cb9ed8 [1421/1421] net: separate out the msghdr copy from ___sys_{send,recv}msg() config: x86_64-buildonly-randconfig-002-20250208 (https://download.01.org/0day-ci/archive/20250208/202502082355.jrzYRRaD-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250208/202502082355.jrzYRRaD-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/202502082355.jrzYRRaD-lkp@intel.com/ Note: it may well be a FALSE warning. FWIW you are at least aware of it now. http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings All warnings (new ones prefixed by >>): In function '__sock_release', inlined from 'sock_close' at net/socket.c:1140:2: net/socket.c:579:21: warning: array subscript -1 is outside array bounds of 'struct inode[9078122083518480]' [-Warray-bounds] 579 | sock->ops->release(sock); | ~~~~^~~~~ net/socket.c:580:26: warning: array subscript -1 is outside array bounds of 'struct inode[9078122083518480]' [-Warray-bounds] 580 | sock->sk = NULL; In file included from arch/x86/include/asm/preempt.h:7, from include/linux/preempt.h:81, from include/linux/spinlock.h:51, from include/linux/mmzone.h:9, from include/linux/gfp.h:6, from include/linux/mm.h:11, from net/socket.c:61: In function 'check_object_size', inlined from 'check_copy_size' at include/linux/thread_info.h:90:2, inlined from 'copy_from_user' at include/linux/uaccess.h:143:6, inlined from '____sys_sendmsg' at net/socket.c:2110:7: >> include/linux/thread_info.h:59:17: warning: 'ctl' may be used uninitialized [-Wmaybe-uninitialized] 59 | __check_object_size(ptr, n, to_user); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/thread_info.h: In function '____sys_sendmsg': include/linux/thread_info.h:52:13: note: by argument 1 of type 'const void *' to '__check_object_size' declared here 52 | extern void __check_object_size(const void *ptr, unsigned long n, | ^~~~~~~~~~~~~~~~~~~ net/socket.c:2075:23: note: 'ctl' declared here 2075 | unsigned char ctl[sizeof(struct cmsghdr) + 20] | ^~~ In function 'check_object_size', inlined from 'check_copy_size' at include/linux/thread_info.h:90:2, inlined from 'copy_from_user' at include/linux/uaccess.h:143:6, inlined from '__do_sys_socketcall' at net/socket.c:2618:6, inlined from '__se_sys_socketcall' at net/socket.c:2602:1: include/linux/thread_info.h:59:17: warning: 'a' may be used uninitialized [-Wmaybe-uninitialized] 59 | __check_object_size(ptr, n, to_user); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/thread_info.h: In function '__se_sys_socketcall': include/linux/thread_info.h:52:13: note: by argument 1 of type 'const void *' to '__check_object_size' declared here 52 | extern void __check_object_size(const void *ptr, unsigned long n, | ^~~~~~~~~~~~~~~~~~~ net/socket.c:2604:23: note: 'a' declared here 2604 | unsigned long a[AUDITSC_ARGS]; | ^ net/socket.c:573: warning: Function parameter or member 'inode' not described in '__sock_release' vim +/ctl +59 include/linux/thread_info.h 0f60a8efe4005a Kees Cook 2016-07-12 50 f5509cc18daa7f Kees Cook 2016-06-07 51 #ifdef CONFIG_HARDENED_USERCOPY f5509cc18daa7f Kees Cook 2016-06-07 52 extern void __check_object_size(const void *ptr, unsigned long n, f5509cc18daa7f Kees Cook 2016-06-07 53 bool to_user); f5509cc18daa7f Kees Cook 2016-06-07 54 a85d6b8242dc78 Kees Cook 2016-09-07 55 static __always_inline void check_object_size(const void *ptr, unsigned long n, f5509cc18daa7f Kees Cook 2016-06-07 56 bool to_user) f5509cc18daa7f Kees Cook 2016-06-07 57 { 81409e9e280588 Kees Cook 2016-08-31 58 if (!__builtin_constant_p(n)) f5509cc18daa7f Kees Cook 2016-06-07 @59 __check_object_size(ptr, n, to_user); f5509cc18daa7f Kees Cook 2016-06-07 60 } f5509cc18daa7f Kees Cook 2016-06-07 61 #else f5509cc18daa7f Kees Cook 2016-06-07 62 static inline void check_object_size(const void *ptr, unsigned long n, f5509cc18daa7f Kees Cook 2016-06-07 63 bool to_user) f5509cc18daa7f Kees Cook 2016-06-07 64 { } f5509cc18daa7f Kees Cook 2016-06-07 65 #endif /* CONFIG_HARDENED_USERCOPY */ f5509cc18daa7f Kees Cook 2016-06-07 66 :::::: The code at line 59 was first introduced by commit :::::: f5509cc18daa7f82bcc553be70df2117c8eedc16 mm: Hardened usercopy :::::: 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
[openeuler:OLK-5.10 2722/2722] fs/ceph/snap.o: warning: objtool: ceph_update_snap_trace()+0xb8c: unreachable instruction
by kernel test robot 08 Feb '25

08 Feb '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 263072f655dcd6fd63f7d5dd1f9c5553134982fa commit: 4925e6790b8bb3d912820724a224fbe9bf7ad4cf [2722/2722] ceph: blocklist the kclient when receiving corrupted snap trace config: x86_64-buildonly-randconfig-002-20250205 (https://download.01.org/0day-ci/archive/20250208/202502082313.lZnwkvkI-lkp@…) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250208/202502082313.lZnwkvkI-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/202502082313.lZnwkvkI-lkp@intel.com/ All warnings (new ones prefixed by >>): >> fs/ceph/snap.o: warning: objtool: ceph_update_snap_trace()+0xb8c: unreachable instruction -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2729/2729] mm/damon/core-test.h:284:2: warning: comparison of distinct pointer types ('typeof (__left) *' (aka 'unsigned int *') and 'typeof (__right) *' (aka 'int *'))
by kernel test robot 08 Feb '25

08 Feb '25
Hi SeongJae, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 263072f655dcd6fd63f7d5dd1f9c5553134982fa commit: 83b931be40b2829e20f38356509d8706ea6b6238 [2729/2729] mm/damon/core-test: test damon_set_regions config: x86_64-buildonly-randconfig-004-20250208 (https://download.01.org/0day-ci/archive/20250208/202502082340.S6mQ2xsd-lkp@…) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250208/202502082340.S6mQ2xsd-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/202502082340.S6mQ2xsd-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from mm/damon/core.c:13: In file included from include/linux/mm.h:1573: include/linux/vmstat.h:431:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 431 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ In file included from mm/damon/core.c:1248: >> mm/damon/core-test.h:284:2: warning: comparison of distinct pointer types ('typeof (__left) *' (aka 'unsigned int *') and 'typeof (__right) *' (aka 'int *')) [-Wcompare-distinct-pointer-types] 284 | KUNIT_EXPECT_EQ(test, damon_nr_regions(t), 3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/kunit/test.h:1234:2: note: expanded from macro 'KUNIT_EXPECT_EQ' 1234 | KUNIT_BINARY_EQ_ASSERTION(test, KUNIT_EXPECTATION, left, right) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/kunit/test.h:871:2: note: expanded from macro 'KUNIT_BINARY_EQ_ASSERTION' 871 | KUNIT_BINARY_EQ_MSG_ASSERTION(test, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 872 | assert_type, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 873 | left, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 874 | right, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 875 | NULL) | ~~~~~ include/kunit/test.h:861:2: note: expanded from macro 'KUNIT_BINARY_EQ_MSG_ASSERTION' 861 | KUNIT_BASE_EQ_MSG_ASSERTION(test, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 862 | kunit_binary_assert, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 863 | KUNIT_INIT_BINARY_ASSERT_STRUCT, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 864 | assert_type, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 865 | left, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 866 | right, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 867 | fmt, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 868 | ##__VA_ARGS__) | ~~~~~~~~~~~~~~ include/kunit/test.h:772:2: note: expanded from macro 'KUNIT_BASE_EQ_MSG_ASSERTION' 772 | KUNIT_BASE_BINARY_ASSERTION(test, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 773 | assert_class, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 774 | ASSERT_CLASS_INIT, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 775 | assert_type, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 776 | left, ==, right, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 777 | fmt, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 778 | ##__VA_ARGS__) | ~~~~~~~~~~~~~~ include/kunit/test.h:748:9: note: expanded from macro 'KUNIT_BASE_BINARY_ASSERTION' 748 | ((void)__typecheck(__left, __right)); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:20:28: note: expanded from macro '__typecheck' 20 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ 2 warnings generated. vim +284 mm/damon/core-test.h 269 270 static void damon_test_set_regions(struct kunit *test) 271 { 272 struct damon_target *t = damon_new_target(); 273 struct damon_region *r1 = damon_new_region(4, 16); 274 struct damon_region *r2 = damon_new_region(24, 32); 275 struct damon_addr_range range = {.start = 8, .end = 28}; 276 unsigned long expects[] = {8, 16, 16, 24, 24, 28}; 277 int expect_idx = 0; 278 struct damon_region *r; 279 280 damon_add_region(r1, t); 281 damon_add_region(r2, t); 282 damon_set_regions(t, &range, 1); 283 > 284 KUNIT_EXPECT_EQ(test, damon_nr_regions(t), 3); 285 damon_for_each_region(r, t) { 286 KUNIT_EXPECT_EQ(test, r->ar.start, expects[expect_idx++]); 287 KUNIT_EXPECT_EQ(test, r->ar.end, expects[expect_idx++]); 288 } 289 damon_destroy_target(t); 290 } 291 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1418/1418] mm/hugetlb.c:1370:6: warning: no previous prototype for function 'free_huge_page_to_dhugetlb_pool'
by kernel test robot 08 Feb '25

08 Feb '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: cc7cb040bd0afe96f1da94c9f21eda5a986510a5 commit: 0bc0d0d57edacd59ebe38d05ad9c4b2bc185aa51 [1418/1418] dhugetlb: backport dynamic hugetlb feature config: x86_64-buildonly-randconfig-003-20250207 (https://download.01.org/0day-ci/archive/20250208/202502082245.oXwKH6sI-lkp@…) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250208/202502082245.oXwKH6sI-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/202502082245.oXwKH6sI-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from mm/hugetlb.c:13: include/linux/pagemap.h:425:21: warning: cast from 'int (*)(struct file *, struct page *)' to 'filler_t *' (aka 'int (*)(void *, struct page *)') converts to incompatible function type [-Wcast-function-type-strict] 425 | filler_t *filler = (filler_t *)mapping->a_ops->readpage; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from mm/hugetlb.c:35: include/linux/mm_inline.h:33:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 33 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages); | ~~~~~~~~~~~ ^ ~~~ include/linux/mm_inline.h:35:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 35 | NR_ZONE_LRU_BASE + lru, nr_pages); | ~~~~~~~~~~~~~~~~ ^ ~~~ >> mm/hugetlb.c:1370:6: warning: no previous prototype for function 'free_huge_page_to_dhugetlb_pool' [-Wmissing-prototypes] 1370 | void free_huge_page_to_dhugetlb_pool(struct page *page, bool restore_reserve) | ^ mm/hugetlb.c:1370:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1370 | void free_huge_page_to_dhugetlb_pool(struct page *page, bool restore_reserve) | ^ | static In file included from mm/hugetlb.c:14: include/linux/mempolicy.h:329:13: warning: unused function '__do_mbind' [-Wunused-function] 329 | static long __do_mbind(unsigned long start, unsigned long len, | ^~~~~~~~~~ 5 warnings generated. vim +/free_huge_page_to_dhugetlb_pool +1370 mm/hugetlb.c 1324 1325 #ifdef CONFIG_DYNAMIC_HUGETLB 1326 static void free_huge_page_to_dhugetlb_pool(struct page *page, 1327 bool restore_reserve) 1328 { 1329 struct hstate *h = page_hstate(page); 1330 struct dhugetlb_pool *hpool; 1331 1332 hpool = get_dhugetlb_pool_from_dhugetlb_pagelist(page); 1333 if (unlikely(!hpool)) { 1334 pr_err("dhugetlb: free error: get hpool failed\n"); 1335 return; 1336 } 1337 1338 spin_lock(&hpool->lock); 1339 ClearPagePool(page); 1340 set_compound_page_dtor(page, NULL_COMPOUND_DTOR); 1341 if (!hstate_is_gigantic(h)) { 1342 list_add(&page->lru, &hpool->dhugetlb_2M_freelists); 1343 hpool->free_reserved_2M++; 1344 hpool->used_2M--; 1345 if (restore_reserve) { 1346 hpool->mmap_reserved_2M++; 1347 trace_dhugetlb_acct_memory(hpool, 1348 hpool->mmap_reserved_2M, 1349 DHUGETLB_RESV_2M); 1350 } 1351 trace_dhugetlb_alloc_free(hpool, page, hpool->free_reserved_2M, 1352 DHUGETLB_FREE_2M); 1353 } else { 1354 list_add(&page->lru, &hpool->dhugetlb_1G_freelists); 1355 hpool->free_reserved_1G++; 1356 hpool->used_1G--; 1357 if (restore_reserve) { 1358 hpool->mmap_reserved_1G++; 1359 trace_dhugetlb_acct_memory(hpool, 1360 hpool->mmap_reserved_1G, 1361 DHUGETLB_RESV_1G); 1362 } 1363 trace_dhugetlb_alloc_free(hpool, page, hpool->free_reserved_1G, 1364 DHUGETLB_FREE_1G); 1365 } 1366 spin_unlock(&hpool->lock); 1367 dhugetlb_pool_put(hpool); 1368 } 1369 #else > 1370 void free_huge_page_to_dhugetlb_pool(struct page *page, bool restore_reserve) 1371 { 1372 } 1373 #endif 1374 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1418/1418] mm/.tmp_ioremap.o: warning: objtool: missing symbol for section .text
by kernel test robot 08 Feb '25

08 Feb '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: cc7cb040bd0afe96f1da94c9f21eda5a986510a5 commit: 004cface9c1c0b6351473934a4ce452193e05b07 [1418/1418] mm: Move vmap_range from mm/ioremap.c to mm/vmalloc.c config: x86_64-buildonly-randconfig-004-20250207 (https://download.01.org/0day-ci/archive/20250208/202502082225.bZGoGhTq-lkp@…) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250208/202502082225.bZGoGhTq-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/202502082225.bZGoGhTq-lkp@intel.com/ All warnings (new ones prefixed by >>): >> mm/.tmp_ioremap.o: warning: objtool: missing symbol for section .text -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1899/1899] mm/memcontrol.c:4428:12: warning: 'mem_cgroup_check_swap_for_v1' defined but not used
by kernel test robot 08 Feb '25

08 Feb '25
Hi Liu, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 96ebabc25b2677a2a225de204946e424cf3887c1 commit: a095a940f784db58ea4e87df361f9a4fd0dd977f [1899/1899] memcg: add restrict to swap to cgroup1 config: x86_64-buildonly-randconfig-001-20250207 (https://download.01.org/0day-ci/archive/20250208/202502082247.kdBxrDeT-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250208/202502082247.kdBxrDeT-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/202502082247.kdBxrDeT-lkp@intel.com/ All warnings (new ones prefixed by >>): >> mm/memcontrol.c:4428:12: warning: 'mem_cgroup_check_swap_for_v1' defined but not used [-Wunused-function] 4428 | static int mem_cgroup_check_swap_for_v1(struct folio *folio, swp_entry_t entry) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +/mem_cgroup_check_swap_for_v1 +4428 mm/memcontrol.c 4427 > 4428 static int mem_cgroup_check_swap_for_v1(struct folio *folio, swp_entry_t entry) 4429 { 4430 return 0; 4431 } 4432 #endif 4433 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1418/1418] mm/memcontrol.c:432:54: warning: array subscript nid is outside array bounds of 'struct mem_cgroup_per_node *[0]'
by kernel test robot 08 Feb '25

08 Feb '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: cc7cb040bd0afe96f1da94c9f21eda5a986510a5 commit: fae91d6d8be5e20c47e459dbeb3d43bd5f9486f4 [1418/1418] mm/list_lru.c: set bit in memcg shrinker bitmap on first list_lru item appearance config: arm64-randconfig-002-20250207 (https://download.01.org/0day-ci/archive/20250208/202502082031.V2tZWUQg-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250208/202502082031.V2tZWUQg-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/202502082031.V2tZWUQg-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from include/linux/page_counter.h:6, from mm/memcontrol.c:34: mm/memcontrol.c: In function 'mem_cgroup_get_max': include/linux/kernel.h:845:45: warning: comparison of unsigned expression in '< 0' is always false [-Wtype-limits] 845 | #define min(x, y) __careful_cmp(x, y, <) | ^ include/linux/kernel.h:828:30: note: in definition of macro '__cmp' 828 | #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) | ^~ include/linux/kernel.h:845:25: note: in expansion of macro '__careful_cmp' 845 | #define min(x, y) __careful_cmp(x, y, <) | ^~~~~~~~~~~~~ mm/memcontrol.c:1365:28: note: in expansion of macro 'min' 1365 | swap_max = min(swap_max, (unsigned long)total_swap_pages); | ^~~ In file included from mm/memcontrol.c:35: In function 'mem_cgroup_nodeinfo', inlined from 'invalidate_reclaim_iterators' at mm/memcontrol.c:1042:9, inlined from 'mem_cgroup_css_released' at mm/memcontrol.c:4526:2: include/linux/memcontrol.h:352:31: warning: array subscript 0 is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] 352 | return memcg->nodeinfo[nid]; | ~~~~~~~~~~~~~~~^~~~~ include/linux/memcontrol.h: In function 'mem_cgroup_css_released': include/linux/memcontrol.h:309:37: note: while referencing 'nodeinfo' 309 | struct mem_cgroup_per_node *nodeinfo[0]; | ^~~~~~~~ In function 'free_mem_cgroup_per_node_info', inlined from '__mem_cgroup_free' at mm/memcontrol.c:4353:3: mm/memcontrol.c:4339:57: warning: array subscript 0 is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] 4339 | struct mem_cgroup_per_node *pn = memcg->nodeinfo[node]; | ~~~~~~~~~~~~~~~^~~~~~ include/linux/memcontrol.h: In function '__mem_cgroup_free': include/linux/memcontrol.h:309:37: note: while referencing 'nodeinfo' 309 | struct mem_cgroup_per_node *nodeinfo[0]; | ^~~~~~~~ In function 'alloc_mem_cgroup_per_node_info', inlined from 'mem_cgroup_alloc' at mm/memcontrol.c:4388:7: mm/memcontrol.c:4333:24: warning: array subscript 0 is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] 4333 | memcg->nodeinfo[node] = pn; | ~~~~~~~~~~~~~~~^~~~~~ include/linux/memcontrol.h: In function 'mem_cgroup_alloc': include/linux/memcontrol.h:309:37: note: while referencing 'nodeinfo' 309 | struct mem_cgroup_per_node *nodeinfo[0]; | ^~~~~~~~ In file included from include/linux/compiler.h:245, from arch/arm64/include/asm/atomic.h:23, from include/linux/atomic.h:7, from include/linux/page_counter.h:5: In function 'memcg_alloc_shrinker_maps', inlined from 'mem_cgroup_css_online' at mm/memcontrol.c:4485:6: mm/memcontrol.c:391:51: warning: array subscript 0 is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] 391 | rcu_assign_pointer(memcg->nodeinfo[nid]->shrinker_map, map); | ~~~~~~~~~~~~~~~^~~~~ arch/arm64/include/asm/barrier.h:95:42: note: in definition of macro '__smp_store_release' 95 | : "=Q" (*p) \ | ^ include/linux/rcupdate.h:411:17: note: in expansion of macro 'smp_store_release' 411 | smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \ | ^~~~~~~~~~~~~~~~~ mm/memcontrol.c:391:17: note: in expansion of macro 'rcu_assign_pointer' 391 | rcu_assign_pointer(memcg->nodeinfo[nid]->shrinker_map, map); | ^~~~~~~~~~~~~~~~~~ include/linux/memcontrol.h: In function 'mem_cgroup_css_online': include/linux/memcontrol.h:309:37: note: while referencing 'nodeinfo' 309 | struct mem_cgroup_per_node *nodeinfo[0]; | ^~~~~~~~ mm/memcontrol.c: In function 'memcg_set_shrinker_bit': >> mm/memcontrol.c:432:54: warning: array subscript nid is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] 432 | map = rcu_dereference(memcg->nodeinfo[nid]->shrinker_map); | ~~~~~~~~~~~~~~~^~~~~ include/linux/compiler.h:252:36: note: in definition of macro '__READ_ONCE' 252 | __read_once_size(&(x), __u.__c, sizeof(x)); \ | ^ include/linux/rcupdate.h:349:55: note: in expansion of macro 'READ_ONCE' 349 | typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \ | ^~~~~~~~~ include/linux/rcupdate.h:486:9: note: in expansion of macro '__rcu_dereference_check' 486 | __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:544:28: note: in expansion of macro 'rcu_dereference_check' 544 | #define rcu_dereference(p) rcu_dereference_check(p, 0) | ^~~~~~~~~~~~~~~~~~~~~ mm/memcontrol.c:432:23: note: in expansion of macro 'rcu_dereference' 432 | map = rcu_dereference(memcg->nodeinfo[nid]->shrinker_map); | ^~~~~~~~~~~~~~~ include/linux/memcontrol.h:309:37: note: while referencing 'nodeinfo' 309 | struct mem_cgroup_per_node *nodeinfo[0]; | ^~~~~~~~ In function 'mem_cgroup_nodeinfo', inlined from 'mem_cgroup_lruvec' at include/linux/memcontrol.h:375:7, inlined from 'mem_cgroup_node_nr_lru_pages' at mm/memcontrol.c:722:26: include/linux/memcontrol.h:352:31: warning: array subscript <unknown> is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] 352 | return memcg->nodeinfo[nid]; | ~~~~~~~~~~~~~~~^~~~~ include/linux/memcontrol.h: In function 'mem_cgroup_node_nr_lru_pages': include/linux/memcontrol.h:309:37: note: while referencing 'nodeinfo' 309 | struct mem_cgroup_per_node *nodeinfo[0]; | ^~~~~~~~ In function 'mem_cgroup_nodeinfo', inlined from 'mem_cgroup_iter' at mm/memcontrol.c:937:8: include/linux/memcontrol.h:352:31: warning: array subscript <unknown> is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] 352 | return memcg->nodeinfo[nid]; | ~~~~~~~~~~~~~~~^~~~~ include/linux/memcontrol.h: In function 'mem_cgroup_iter': include/linux/memcontrol.h:309:37: note: while referencing 'nodeinfo' 309 | struct mem_cgroup_per_node *nodeinfo[0]; | ^~~~~~~~ mm/memcontrol.c: In function '__mem_cgroup_threshold': mm/memcontrol.c:3473:45: warning: array subscript i is outside array bounds of 'struct mem_cgroup_threshold[0]' [-Warray-bounds=] 3473 | for (; i >= 0 && unlikely(t->entries[i].threshold > usage); i--) | ~~~~~~~~~~^~~ include/linux/compiler.h:77:45: note: in definition of macro 'unlikely' 77 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ include/linux/memcontrol.h:162:37: note: while referencing 'entries' 162 | struct mem_cgroup_threshold entries[0]; | ^~~~~~~ mm/memcontrol.c:3474:42: warning: array subscript i is outside array bounds of 'struct mem_cgroup_threshold[0]' [-Warray-bounds=] 3474 | eventfd_signal(t->entries[i].eventfd, 1); | ~~~~~~~~~~^~~ include/linux/memcontrol.h:162:37: note: while referencing 'entries' 162 | struct mem_cgroup_threshold entries[0]; | ^~~~~~~ mm/memcontrol.c:3485:50: warning: array subscript i is outside array bounds of 'struct mem_cgroup_threshold[0]' [-Warray-bounds=] 3485 | for (; i < t->size && unlikely(t->entries[i].threshold <= usage); i++) | ~~~~~~~~~~^~~ include/linux/compiler.h:77:45: note: in definition of macro 'unlikely' 77 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ include/linux/memcontrol.h:162:37: note: while referencing 'entries' 162 | struct mem_cgroup_threshold entries[0]; | ^~~~~~~ mm/memcontrol.c:3486:42: warning: array subscript i is outside array bounds of 'struct mem_cgroup_threshold[0]' [-Warray-bounds=] 3486 | eventfd_signal(t->entries[i].eventfd, 1); | ~~~~~~~~~~^~~ include/linux/memcontrol.h:162:37: note: while referencing 'entries' 162 | struct mem_cgroup_threshold entries[0]; | ^~~~~~~ mm/memcontrol.c: In function 'memcg_check_events.isra': mm/memcontrol.c:502:31: warning: array subscript 0 is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] 502 | return memcg->nodeinfo[nid]; | ~~~~~~~~~~~~~~~^~~~~ include/linux/memcontrol.h:309:37: note: while referencing 'nodeinfo' 309 | struct mem_cgroup_per_node *nodeinfo[0]; | ^~~~~~~~ mm/memcontrol.c: In function '__mem_cgroup_usage_unregister_event': mm/memcontrol.c:3680:49: warning: array subscript i is outside array bounds of 'struct mem_cgroup_threshold[0]' [-Warray-bounds=] 3680 | if (thresholds->primary->entries[i].eventfd == eventfd) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ include/linux/memcontrol.h:162:37: note: while referencing 'entries' 162 | struct mem_cgroup_threshold entries[0]; | ^~~~~~~ mm/memcontrol.c:3683:63: warning: array subscript i is outside array bounds of 'struct mem_cgroup_threshold[0]' [-Warray-bounds=] 3683 | new->entries[j] = thresholds->primary->entries[i]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ include/linux/memcontrol.h:162:37: note: while referencing 'entries' 162 | struct mem_cgroup_threshold entries[0]; | ^~~~~~~ mm/memcontrol.c:3683:29: warning: array subscript j is outside array bounds of 'struct mem_cgroup_threshold[0]' [-Warray-bounds=] 3683 | new->entries[j] = thresholds->primary->entries[i]; | ~~~~~~~~~~~~^~~ include/linux/memcontrol.h:162:37: note: while referencing 'entries' 162 | struct mem_cgroup_threshold entries[0]; | ^~~~~~~ mm/memcontrol.c:3684:33: warning: array subscript j is outside array bounds of 'struct mem_cgroup_threshold[0]' [-Warray-bounds=] 3684 | if (new->entries[j].threshold <= usage) { | ~~~~~~~~~~~~^~~ include/linux/memcontrol.h:162:37: note: while referencing 'entries' vim +432 mm/memcontrol.c 373 374 static int memcg_alloc_shrinker_maps(struct mem_cgroup *memcg) 375 { 376 struct memcg_shrinker_map *map; 377 int nid, size, ret = 0; 378 379 if (mem_cgroup_is_root(memcg)) 380 return 0; 381 382 mutex_lock(&memcg_shrinker_map_mutex); 383 size = memcg_shrinker_map_size; 384 for_each_node(nid) { 385 map = kvzalloc(sizeof(*map) + size, GFP_KERNEL); 386 if (!map) { 387 memcg_free_shrinker_maps(memcg); 388 ret = -ENOMEM; 389 break; 390 } > 391 rcu_assign_pointer(memcg->nodeinfo[nid]->shrinker_map, map); 392 } 393 mutex_unlock(&memcg_shrinker_map_mutex); 394 395 return ret; 396 } 397 398 int memcg_expand_shrinker_maps(int new_id) 399 { 400 int size, old_size, ret = 0; 401 struct mem_cgroup *memcg; 402 403 size = DIV_ROUND_UP(new_id + 1, BITS_PER_LONG) * sizeof(unsigned long); 404 old_size = memcg_shrinker_map_size; 405 if (size <= old_size) 406 return 0; 407 408 mutex_lock(&memcg_shrinker_map_mutex); 409 if (!root_mem_cgroup) 410 goto unlock; 411 412 for_each_mem_cgroup(memcg) { 413 if (mem_cgroup_is_root(memcg)) 414 continue; 415 ret = memcg_expand_one_shrinker_map(memcg, size, old_size); 416 if (ret) 417 goto unlock; 418 } 419 unlock: 420 if (!ret) 421 memcg_shrinker_map_size = size; 422 mutex_unlock(&memcg_shrinker_map_mutex); 423 return ret; 424 } 425 426 void memcg_set_shrinker_bit(struct mem_cgroup *memcg, int nid, int shrinker_id) 427 { 428 if (shrinker_id >= 0 && memcg && !mem_cgroup_is_root(memcg)) { 429 struct memcg_shrinker_map *map; 430 431 rcu_read_lock(); > 432 map = rcu_dereference(memcg->nodeinfo[nid]->shrinker_map); 433 set_bit(shrinker_id, map->map); 434 rcu_read_unlock(); 435 } 436 } 437 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1899/1899] mm/dynamic_pool.c:1612:51: warning: variable 'ret' is uninitialized when used here
by kernel test robot 08 Feb '25

08 Feb '25
Hi Liu, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 8673e7441a723dd5e885e372a4d0351658286304 commit: cf98ffbc116bc49dc4506c68e20b02e26519ad35 [1899/1899] mm/dynamic_pool: fill dpool with pagelist config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250208/202502081751.f1v777Vf-lkp@…) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250208/202502081751.f1v777Vf-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/202502081751.f1v777Vf-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from mm/dynamic_pool.c:10: In file included from include/linux/memblock.h:12: In file included from include/linux/mm.h:2181: include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 508 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 509 | item]; | ~~~~ include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 515 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 516 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 527 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 528 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 536 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 537 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ mm/dynamic_pool.c:836:6: warning: variable 'type' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] 836 | if (!dpool->online) | ^~~~~~~~~~~~~~ mm/dynamic_pool.c:865:36: note: uninitialized use occurs here 865 | trace_dpool_alloc_hugepage(dpool, type, folio, pool->free_huge_pages, | ^~~~ mm/dynamic_pool.c:836:2: note: remove the 'if' if its condition is always false 836 | if (!dpool->online) | ^~~~~~~~~~~~~~~~~~~ 837 | goto unlock; | ~~~~~~~~~~~ mm/dynamic_pool.c:826:10: note: initialize the variable 'type' to silence this warning 826 | int type; | ^ | = 0 mm/dynamic_pool.c:836:6: warning: variable 'pool' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] 836 | if (!dpool->online) | ^~~~~~~~~~~~~~ mm/dynamic_pool.c:865:49: note: uninitialized use occurs here 865 | trace_dpool_alloc_hugepage(dpool, type, folio, pool->free_huge_pages, | ^~~~ mm/dynamic_pool.c:836:2: note: remove the 'if' if its condition is always false 836 | if (!dpool->online) | ^~~~~~~~~~~~~~~~~~~ 837 | goto unlock; | ~~~~~~~~~~~ mm/dynamic_pool.c:823:25: note: initialize the variable 'pool' to silence this warning 823 | struct pages_pool *pool; | ^ | = NULL >> mm/dynamic_pool.c:1612:51: warning: variable 'ret' is uninitialized when used here [-Wuninitialized] 1612 | pr_err("init failed, create failed. ret: %d\n", ret); | ^~~ include/linux/printk.h:498:33: note: expanded from macro 'pr_err' 498 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~~ include/linux/printk.h:455:60: note: expanded from macro 'printk' 455 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) | ^~~~~~~~~~~ include/linux/printk.h:427:19: note: expanded from macro 'printk_index_wrap' 427 | _p_func(_fmt, ##__VA_ARGS__); \ | ^~~~~~~~~~~ mm/dynamic_pool.c:1586:9: note: initialize the variable 'ret' to silence this warning 1586 | int ret; | ^ | = 0 8 warnings generated. vim +/ret +1612 mm/dynamic_pool.c 1582 1583 int dpool_init(struct dpool_info *arg) 1584 { 1585 struct dynamic_pool *dpool; 1586 int ret; 1587 1588 if (!dpool_enabled) 1589 return -EINVAL; 1590 1591 if (!arg || !arg->memcg || arg->range_cnt <= 0) { 1592 pr_err("init failed, arg is invalid\n"); 1593 return -EINVAL; 1594 } 1595 1596 mutex_lock(&dpool_mutex); 1597 1598 if (dpool_global_pool || arg->memcg->dpool) { 1599 pr_err("init failed, dpool is already exist\n"); 1600 ret = -EINVAL; 1601 goto unlock; 1602 } 1603 1604 if (!(arg->memcg->css.cgroup->self.flags & CSS_ONLINE)) { 1605 pr_err("init failed, memcg is not online\n"); 1606 ret = -EINVAL; 1607 goto unlock; 1608 } 1609 1610 dpool = dpool_create(arg->memcg, &pagelist_dpool_ops); 1611 if (!dpool) { > 1612 pr_err("init failed, create failed. ret: %d\n", ret); 1613 ret = -ENOMEM; 1614 goto unlock; 1615 } 1616 1617 dpool_global_pool = dpool; 1618 1619 BUG_ON(!dpool->ops->fill_pool); 1620 ret = dpool->ops->fill_pool(dpool, arg); 1621 if (ret) 1622 dpool_put(dpool); 1623 1624 unlock: 1625 mutex_unlock(&dpool_mutex); 1626 1627 return ret; 1628 } 1629 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • ...
  • 1902
  • Older →

HyperKitty Powered by HyperKitty