tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 02951ceaa6d546dfa0f741f52f6d47e0fb0ac7b4
commit: 2a3cb8baef71e4dad4a6ec17f5f0db9e05f46a01 [1341/1341] mm/sparse: delete old sparse_init and enable new one
config: x86_64-buildonly-randconfig-006-20241220 (https://download.01.org/0day-ci/archive/20241221/202412210532.I31r9MaS-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/20241221/202412210532.I31r9MaS-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/202412210532.I31r9MaS-lkp@intel.com/
All warnings (new ones prefixed by >>):
mm/sparse.c: In function 'sparse_init_nid':
mm/sparse.c:199:27: warning: comparison of unsigned expression in '>= 0' is always true [-Wtype-limits]
199 | ((section_nr >= 0) && \
| ^~
mm/sparse.c:461:9: note: in expansion of macro 'for_each_present_section_nr'
461 | for_each_present_section_nr(pnum_begin, pnum) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/sparse.c:199:27: warning: comparison of unsigned expression in '>= 0' is always true [-Wtype-limits]
199 | ((section_nr >= 0) && \
| ^~
mm/sparse.c:480:9: note: in expansion of macro 'for_each_present_section_nr'
480 | for_each_present_section_nr(pnum_begin, pnum) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/sparse.c: In function 'sparse_init':
mm/sparse.c:199:27: warning: comparison of unsigned expression in '>= 0' is always true [-Wtype-limits]
199 | ((section_nr >= 0) && \
| ^~
mm/sparse.c:503:9: note: in expansion of macro 'for_each_present_section_nr'
503 | for_each_present_section_nr(pnum_begin + 1, pnum_end) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> mm/sparse.o: warning: objtool: missing symbol for section .init.text
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 02951ceaa6d546dfa0f741f52f6d47e0fb0ac7b4
commit: 2d2fe6b40444bd8f84f674930ac5f98a6314702e [1341/1341] ascend: mm: add an owner for mm_struct
config: x86_64-randconfig-r052-20241221 (https://download.01.org/0day-ci/archive/20241221/202412210351.AFkLgZJH-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/20241221/202412210351.AFkLgZJH-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/202412210351.AFkLgZJH-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/printk.h:7,
from include/linux/kernel.h:14,
from mm/debug.c:9:
mm/debug.c: In function 'dump_mm':
>> include/linux/kern_levels.h:5:25: warning: format '%p' expects argument of type 'void *', but argument 38 has type 'int' [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:8:25: note: in expansion of macro 'KERN_SOH'
8 | #define KERN_EMERG KERN_SOH "0" /* system is unusable */
| ^~~~~~~~
include/linux/printk.h:342:16: note: in expansion of macro 'KERN_EMERG'
342 | printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~
mm/debug.c:117:9: note: in expansion of macro 'pr_emerg'
117 | pr_emerg("mm %px mmap %px seqnum %llu task_size %lu\n"
| ^~~~~~~~
>> include/linux/kern_levels.h:5:25: warning: format '%d' expects argument of type 'int', but argument 39 has type 'long unsigned int' [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:8:25: note: in expansion of macro 'KERN_SOH'
8 | #define KERN_EMERG KERN_SOH "0" /* system is unusable */
| ^~~~~~~~
include/linux/printk.h:342:16: note: in expansion of macro 'KERN_EMERG'
342 | printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~
mm/debug.c:117:9: note: in expansion of macro 'pr_emerg'
117 | pr_emerg("mm %px mmap %px seqnum %llu task_size %lu\n"
| ^~~~~~~~
>> include/linux/kern_levels.h:5:25: warning: format '%lx' expects argument of type 'long unsigned int', but argument 40 has type 'const long unsigned int *' [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:8:25: note: in expansion of macro 'KERN_SOH'
8 | #define KERN_EMERG KERN_SOH "0" /* system is unusable */
| ^~~~~~~~
include/linux/printk.h:342:16: note: in expansion of macro 'KERN_EMERG'
342 | printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~
mm/debug.c:117:9: note: in expansion of macro 'pr_emerg'
117 | pr_emerg("mm %px mmap %px seqnum %llu task_size %lu\n"
| ^~~~~~~~
>> include/linux/kern_levels.h:5:25: warning: format '%p' expects a matching 'void *' argument [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:8:25: note: in expansion of macro 'KERN_SOH'
8 | #define KERN_EMERG KERN_SOH "0" /* system is unusable */
| ^~~~~~~~
include/linux/printk.h:342:16: note: in expansion of macro 'KERN_EMERG'
342 | printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~
mm/debug.c:117:9: note: in expansion of macro 'pr_emerg'
117 | pr_emerg("mm %px mmap %px seqnum %llu task_size %lu\n"
| ^~~~~~~~
vim +5 include/linux/kern_levels.h
314ba3520e513a7 Joe Perches 2012-07-30 4
04d2c8c83d0e3ac Joe Perches 2012-07-30 @5 #define KERN_SOH "\001" /* ASCII Start Of Header */
04d2c8c83d0e3ac Joe Perches 2012-07-30 6 #define KERN_SOH_ASCII '\001'
04d2c8c83d0e3ac Joe Perches 2012-07-30 7
:::::: The code at line 5 was first introduced by commit
:::::: 04d2c8c83d0e3ac5f78aeede51babb3236200112 printk: convert the format for KERN_<LEVEL> to a 2 byte pattern
:::::: TO: Joe Perches <joe(a)perches.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi Ding,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 02951ceaa6d546dfa0f741f52f6d47e0fb0ac7b4
commit: 9469d1759c2905dcef49df7e6240ad5c32b66296 [1341/1341] ascend: share_pool: enable svm to use share pool memory
config: arm64-randconfig-002-20241220 (https://download.01.org/0day-ci/archive/20241221/202412210226.N1hHrIDJ-lkp@…)
compiler: aarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241221/202412210226.N1hHrIDJ-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/202412210226.N1hHrIDJ-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 >>):
drivers/char/svm.c:249:21: warning: no previous prototype for 'svm_find_mem_reg_node' [-Wmissing-prototypes]
249 | struct device_node *svm_find_mem_reg_node(struct device *dev, const char *compat)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/char/svm.c:419:6: warning: no previous prototype for 'sysrq_sched_debug_show_export' [-Wmissing-prototypes]
419 | void sysrq_sched_debug_show_export(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/char/svm.c:1429:5: warning: no previous prototype for 'svm_get_pasid' [-Wmissing-prototypes]
1429 | int svm_get_pasid(pid_t vpid, int dev_id __maybe_unused)
| ^~~~~~~~~~~~~
drivers/char/svm.c:1502:5: warning: no previous prototype for '__svm_get_mpam' [-Wmissing-prototypes]
1502 | int __svm_get_mpam(struct svm_mpam *mpam)
| ^~~~~~~~~~~~~~
In file included from arch/arm64/include/asm/atomic.h:34,
from include/linux/atomic.h:7,
from include/asm-generic/bitops/atomic.h:5,
from arch/arm64/include/asm/bitops.h:37,
from include/linux/bitops.h:19,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:18,
from arch/arm64/include/asm/bug.h:37,
from arch/arm64/include/asm/memory.h:27,
from arch/arm64/include/asm/esr.h:21,
from drivers/char/svm.c:10:
In function '__cmpxchg_case_mb_4',
inlined from '__cmpxchg_mb' at arch/arm64/include/asm/cmpxchg.h:143:1,
inlined from 'svm_proc_load_flag' at drivers/char/svm.c:1967:12:
arch/arm64/include/asm/atomic_lse.h:492:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'atomic_t[1]' [-Warray-bounds=]
492 | asm volatile( \
| ^~~
arch/arm64/include/asm/atomic_lse.h:523:1: note: in expansion of macro '__CMPXCHG_CASE'
523 | __CMPXCHG_CASE(w, , mb_4, al, "memory")
| ^~~~~~~~~~~~~~
drivers/char/svm.c: In function 'svm_proc_load_flag':
drivers/char/svm.c:1958:25: note: object 'l2buf_load_flag' of size 4
1958 | static atomic_t l2buf_load_flag = ATOMIC_INIT(0);
| ^~~~~~~~~~~~~~~
In function '__cmpxchg_case_mb_4',
inlined from '__cmpxchg_mb' at arch/arm64/include/asm/cmpxchg.h:143:1,
inlined from 'svm_proc_load_flag' at drivers/char/svm.c:1967:12:
arch/arm64/include/asm/atomic_lse.h:492:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'atomic_t[1]' [-Warray-bounds=]
492 | asm volatile( \
| ^~~
arch/arm64/include/asm/atomic_lse.h:523:1: note: in expansion of macro '__CMPXCHG_CASE'
523 | __CMPXCHG_CASE(w, , mb_4, al, "memory")
| ^~~~~~~~~~~~~~
drivers/char/svm.c: In function 'svm_proc_load_flag':
drivers/char/svm.c:1958:25: note: object 'l2buf_load_flag' of size 4
1958 | static atomic_t l2buf_load_flag = ATOMIC_INIT(0);
| ^~~~~~~~~~~~~~~
In file included from drivers/char/svm.c:29:
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:144:7,
inlined from 'svm_sp_alloc_mem' at drivers/char/svm.c:2144:8:
>> include/linux/uaccess.h:112:17: warning: 'spallocinfo' may be used uninitialized [-Wmaybe-uninitialized]
112 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/compiler.h:251,
from arch/arm64/include/asm/memory.h:24:
include/linux/kasan-checks.h: In function 'svm_sp_alloc_mem':
include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here
7 | void kasan_check_write(const volatile void *p, unsigned int size);
| ^~~~~~~~~~~~~~~~~
drivers/char/svm.c:2135:24: note: 'spallocinfo' declared here
2135 | struct spalloc spallocinfo;
| ^~~~~~~~~~~
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:144:7,
inlined from 'svm_get_phy_memory_info' at drivers/char/svm.c:1805:6:
include/linux/uaccess.h:112:17: warning: 'para' may be used uninitialized [-Wmaybe-uninitialized]
112 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kasan-checks.h: In function 'svm_get_phy_memory_info':
include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here
7 | void kasan_check_write(const volatile void *p, unsigned int size);
| ^~~~~~~~~~~~~~~~~
drivers/char/svm.c:1800:33: note: 'para' declared here
1800 | struct phymeminfo_ioctl para;
| ^~~~
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:144:7,
inlined from 'svm_remap_proc' at drivers/char/svm.c:1863:8:
include/linux/uaccess.h:112:17: warning: 'pmem' may be used uninitialized [-Wmaybe-uninitialized]
112 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kasan-checks.h: In function 'svm_remap_proc':
include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here
7 | void kasan_check_write(const volatile void *p, unsigned int size);
| ^~~~~~~~~~~~~~~~~
drivers/char/svm.c:1849:29: note: 'pmem' declared here
1849 | struct svm_proc_mem pmem;
| ^~~~
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:144:7,
inlined from 'svm_ioctl' at drivers/char/svm.c:2217:9:
include/linux/uaccess.h:112:17: warning: 'params' may be used uninitialized [-Wmaybe-uninitialized]
112 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kasan-checks.h: In function 'svm_ioctl':
include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here
7 | void kasan_check_write(const volatile void *p, unsigned int size);
| ^~~~~~~~~~~~~~~~~
drivers/char/svm.c:2209:33: note: 'params' declared here
2209 | struct svm_bind_process params;
| ^~~~~~
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:144:7,
inlined from 'svm_sp_free_mem' at drivers/char/svm.c:2179:8,
inlined from 'svm_ioctl' at drivers/char/svm.c:2280:9:
>> include/linux/uaccess.h:112:17: warning: 'spallocinfo' may be used uninitialized [-Wmaybe-uninitialized]
112 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kasan-checks.h: In function 'svm_ioctl':
include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here
7 | void kasan_check_write(const volatile void *p, unsigned int size);
| ^~~~~~~~~~~~~~~~~
drivers/char/svm.c:2172:24: note: 'spallocinfo' declared here
2172 | struct spalloc spallocinfo;
| ^~~~~~~~~~~
vim +/spallocinfo +112 include/linux/uaccess.h
d597580d373774 Al Viro 2017-03-20 104
d597580d373774 Al Viro 2017-03-20 105 #ifdef INLINE_COPY_FROM_USER
d597580d373774 Al Viro 2017-03-20 106 static inline unsigned long
d597580d373774 Al Viro 2017-03-20 107 _copy_from_user(void *to, const void __user *from, unsigned long n)
d597580d373774 Al Viro 2017-03-20 108 {
d597580d373774 Al Viro 2017-03-20 109 unsigned long res = n;
9c5f6908de03a4 Al Viro 2017-06-29 110 might_fault();
4983cb67a383a7 Linus Torvalds 2019-02-14 111 if (likely(access_ok(from, n))) {
9c5f6908de03a4 Al Viro 2017-06-29 @112 kasan_check_write(to, n);
d597580d373774 Al Viro 2017-03-20 113 res = raw_copy_from_user(to, from, n);
9c5f6908de03a4 Al Viro 2017-06-29 114 }
d597580d373774 Al Viro 2017-03-20 115 if (unlikely(res))
d597580d373774 Al Viro 2017-03-20 116 memset(to + (n - res), 0, res);
d597580d373774 Al Viro 2017-03-20 117 return res;
d597580d373774 Al Viro 2017-03-20 118 }
d597580d373774 Al Viro 2017-03-20 119 #else
d597580d373774 Al Viro 2017-03-20 120 extern unsigned long
d597580d373774 Al Viro 2017-03-20 121 _copy_from_user(void *, const void __user *, unsigned long);
d597580d373774 Al Viro 2017-03-20 122 #endif
d597580d373774 Al Viro 2017-03-20 123
:::::: The code at line 112 was first introduced by commit
:::::: 9c5f6908de03a4f52ba7364b11fcd6116225480c copy_{from,to}_user(): move kasan checks and might_fault() out-of-line
:::::: TO: Al Viro <viro(a)zeniv.linux.org.uk>
:::::: CC: Al Viro <viro(a)zeniv.linux.org.uk>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi Jean-Philippe,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 02951ceaa6d546dfa0f741f52f6d47e0fb0ac7b4
commit: 2dd8345826607c5d2d6528de872118da554015b6 [1341/1341] vfio: Add support for Shared Virtual Addressing
config: arm64-randconfig-002-20241220 (https://download.01.org/0day-ci/archive/20241221/202412210041.OxTX5o7L-lkp@…)
compiler: aarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241221/202412210041.OxTX5o7L-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/202412210041.OxTX5o7L-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 file included from include/linux/compat.h:19,
from drivers/vfio/vfio_iommu_type1.c:27:
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:144:7,
inlined from 'vfio_iommu_type1_bind_process' at drivers/vfio/vfio_iommu_type1.c:1933:6:
include/linux/uaccess.h:112:17: warning: 'params' may be used uninitialized [-Wmaybe-uninitialized]
112 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/compiler.h:251,
from include/asm-generic/div64.h:25,
from ./arch/arm64/include/generated/asm/div64.h:1,
from include/linux/math64.h:6,
from include/linux/time64.h:5,
from include/linux/compat_time.h:6,
from include/linux/compat.h:10:
include/linux/kasan-checks.h: In function 'vfio_iommu_type1_bind_process':
include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here
7 | void kasan_check_write(const volatile void *p, unsigned int size);
| ^~~~~~~~~~~~~~~~~
drivers/vfio/vfio_iommu_type1.c:1920:46: note: 'params' declared here
1920 | struct vfio_iommu_type1_bind_process params;
| ^~~~~~
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:144:7,
inlined from 'vfio_iommu_type1_unbind_process' at drivers/vfio/vfio_iommu_type1.c:2021:6:
include/linux/uaccess.h:112:17: warning: 'params' may be used uninitialized [-Wmaybe-uninitialized]
112 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kasan-checks.h: In function 'vfio_iommu_type1_unbind_process':
include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here
7 | void kasan_check_write(const volatile void *p, unsigned int size);
| ^~~~~~~~~~~~~~~~~
drivers/vfio/vfio_iommu_type1.c:2014:46: note: 'params' declared here
2014 | struct vfio_iommu_type1_bind_process params;
| ^~~~~~
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:144:7,
inlined from 'vfio_iommu_type1_ioctl.part.0' at drivers/vfio/vfio_iommu_type1.c:2084:7:
include/linux/uaccess.h:112:17: warning: 'info' may be used uninitialized [-Wmaybe-uninitialized]
112 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kasan-checks.h: In function 'vfio_iommu_type1_ioctl.part.0':
include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here
7 | void kasan_check_write(const volatile void *p, unsigned int size);
| ^~~~~~~~~~~~~~~~~
drivers/vfio/vfio_iommu_type1.c:2080:46: note: 'info' declared here
2080 | struct vfio_iommu_type1_info info;
| ^~~~
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:144:7,
inlined from 'vfio_iommu_type1_ioctl.part.0' at drivers/vfio/vfio_iommu_type1.c:2104:7:
include/linux/uaccess.h:112:17: warning: 'map' may be used uninitialized [-Wmaybe-uninitialized]
112 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kasan-checks.h: In function 'vfio_iommu_type1_ioctl.part.0':
include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here
7 | void kasan_check_write(const volatile void *p, unsigned int size);
| ^~~~~~~~~~~~~~~~~
drivers/vfio/vfio_iommu_type1.c:2098:49: note: 'map' declared here
2098 | struct vfio_iommu_type1_dma_map map;
| ^~~
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:144:7,
inlined from 'vfio_iommu_type1_ioctl.part.0' at drivers/vfio/vfio_iommu_type1.c:2118:7:
include/linux/uaccess.h:112:17: warning: 'unmap' may be used uninitialized [-Wmaybe-uninitialized]
112 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kasan-checks.h: In function 'vfio_iommu_type1_ioctl.part.0':
include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here
7 | void kasan_check_write(const volatile void *p, unsigned int size);
| ^~~~~~~~~~~~~~~~~
drivers/vfio/vfio_iommu_type1.c:2113:51: note: 'unmap' declared here
2113 | struct vfio_iommu_type1_dma_unmap unmap;
| ^~~~~
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:144:7,
inlined from 'vfio_iommu_type1_ioctl.part.0' at drivers/vfio/vfio_iommu_type1.c:2136:7:
>> include/linux/uaccess.h:112:17: warning: 'bind' may be used uninitialized [-Wmaybe-uninitialized]
112 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kasan-checks.h: In function 'vfio_iommu_type1_ioctl.part.0':
include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here
7 | void kasan_check_write(const volatile void *p, unsigned int size);
| ^~~~~~~~~~~~~~~~~
drivers/vfio/vfio_iommu_type1.c:2132:46: note: 'bind' declared here
2132 | struct vfio_iommu_type1_bind bind;
| ^~~~
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:144:7,
inlined from 'vfio_iommu_type1_ioctl.part.0' at drivers/vfio/vfio_iommu_type1.c:2155:7:
>> include/linux/uaccess.h:112:17: warning: 'bind' may be used uninitialized [-Wmaybe-uninitialized]
112 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kasan-checks.h: In function 'vfio_iommu_type1_ioctl.part.0':
include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here
7 | void kasan_check_write(const volatile void *p, unsigned int size);
| ^~~~~~~~~~~~~~~~~
drivers/vfio/vfio_iommu_type1.c:2151:46: note: 'bind' declared here
2151 | struct vfio_iommu_type1_bind bind;
| ^~~~
vim +/bind +112 include/linux/uaccess.h
d597580d373774 Al Viro 2017-03-20 104
d597580d373774 Al Viro 2017-03-20 105 #ifdef INLINE_COPY_FROM_USER
d597580d373774 Al Viro 2017-03-20 106 static inline unsigned long
d597580d373774 Al Viro 2017-03-20 107 _copy_from_user(void *to, const void __user *from, unsigned long n)
d597580d373774 Al Viro 2017-03-20 108 {
d597580d373774 Al Viro 2017-03-20 109 unsigned long res = n;
9c5f6908de03a4 Al Viro 2017-06-29 110 might_fault();
4983cb67a383a7 Linus Torvalds 2019-02-14 111 if (likely(access_ok(from, n))) {
9c5f6908de03a4 Al Viro 2017-06-29 @112 kasan_check_write(to, n);
d597580d373774 Al Viro 2017-03-20 113 res = raw_copy_from_user(to, from, n);
9c5f6908de03a4 Al Viro 2017-06-29 114 }
d597580d373774 Al Viro 2017-03-20 115 if (unlikely(res))
d597580d373774 Al Viro 2017-03-20 116 memset(to + (n - res), 0, res);
d597580d373774 Al Viro 2017-03-20 117 return res;
d597580d373774 Al Viro 2017-03-20 118 }
d597580d373774 Al Viro 2017-03-20 119 #else
d597580d373774 Al Viro 2017-03-20 120 extern unsigned long
d597580d373774 Al Viro 2017-03-20 121 _copy_from_user(void *, const void __user *, unsigned long);
d597580d373774 Al Viro 2017-03-20 122 #endif
d597580d373774 Al Viro 2017-03-20 123
:::::: The code at line 112 was first introduced by commit
:::::: 9c5f6908de03a4f52ba7364b11fcd6116225480c copy_{from,to}_user(): move kasan checks and might_fault() out-of-line
:::::: TO: Al Viro <viro(a)zeniv.linux.org.uk>
:::::: CC: Al Viro <viro(a)zeniv.linux.org.uk>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi Jan,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 02951ceaa6d546dfa0f741f52f6d47e0fb0ac7b4
commit: 5d5f0e49572a1948fa42fd082aaa8238757614bd [1334/1334] ext4: Check journal inode extents more carefully
config: x86_64-randconfig-102-20241218 (https://download.01.org/0day-ci/archive/20241220/202412202311.0ETgmhXR-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/20241220/202412202311.0ETgmhXR-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/202412202311.0ETgmhXR-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from fs/ext4/inode.c:25:
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;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
>> fs/ext4/inode.o: warning: objtool: ext4_map_blocks()+0x9ea: unreachable instruction
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 02951ceaa6d546dfa0f741f52f6d47e0fb0ac7b4
commit: 56bc1719652e7a937bc9856f76f0c0fbf8ce1b23 [1336/1336] objtool: Support GCC 9 cold subfunction naming scheme
config: x86_64-buildonly-randconfig-001-20241219 (https://download.01.org/0day-ci/archive/20241220/202412201921.TZ1izhG7-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/20241220/202412201921.TZ1izhG7-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/202412201921.TZ1izhG7-lkp@intel.com/
All warnings (new ones prefixed by >>):
kernel/time/posix-stubs.c:27:17: warning: no previous prototype for 'sys_ni_posix_timers' [-Wmissing-prototypes]
27 | asmlinkage long sys_ni_posix_timers(void)
| ^~~~~~~~~~~~~~~~~~~
kernel/time/posix-stubs.c:74:5: warning: no previous prototype for 'do_clock_gettime' [-Wmissing-prototypes]
74 | int do_clock_gettime(clockid_t which_clock, struct timespec64 *tp)
| ^~~~~~~~~~~~~~~~
>> kernel/time/.tmp_posix-stubs.o: warning: objtool: sys_ni_posix_timers.cold()+0x0: unreachable instruction
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki