[linux-next:master 7343/8016] mm/kmsan/instrumentation.c:318:42: sparse: sparse: Using plain integer as NULL pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   df9574a57d02b265322e77fb8628d4d33641dda9
commit: 46e281044468bb35b00581f099d195702fdec1ec [7343/8016] kmsan: enable on s390
config: s390-randconfig-r123-20240627 (https://download.01.org/0day-ci/archive/20240627/202406272033.KejtfLkw-lkp@xxxxxxxxx/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 326ba38a991250a8587a399a260b0f7af2c9166a)
reproduce: (https://download.01.org/0day-ci/archive/20240627/202406272033.KejtfLkw-lkp@xxxxxxxxx/reproduce)

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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406272033.KejtfLkw-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> mm/kmsan/instrumentation.c:318:42: sparse: sparse: Using plain integer as NULL pointer
   mm/kmsan/instrumentation.c:319:69: sparse: sparse: Using plain integer as NULL pointer
--
>> mm/kmsan/hooks.c:269:14: sparse: sparse: cast removes address space '__user' of expression
>> mm/kmsan/hooks.c:271:75: sparse: sparse: incorrect type in argument 3 (different address spaces) @@     expected void const *user_addr @@     got void [noderef] __user *to @@
   mm/kmsan/hooks.c:271:75: sparse:     expected void const *user_addr
   mm/kmsan/hooks.c:271:75: sparse:     got void [noderef] __user *to
   mm/kmsan/hooks.c:280:50: sparse: sparse: cast removes address space '__user' of expression
>> mm/kmsan/hooks.c:306:59: sparse: sparse: Using plain integer as NULL pointer
   mm/kmsan/hooks.c:319:79: sparse: sparse: Using plain integer as NULL pointer
   mm/kmsan/hooks.c:325:79: sparse: sparse: Using plain integer as NULL pointer
   mm/kmsan/hooks.c:421:78: sparse: sparse: Using plain integer as NULL pointer

vim +318 mm/kmsan/instrumentation.c

f80be4571b19b9 Alexander Potapenko 2022-09-15  307  
f80be4571b19b9 Alexander Potapenko 2022-09-15  308  /*
f80be4571b19b9 Alexander Potapenko 2022-09-15  309   * Report that an uninitialized value with the given origin was used in a way
f80be4571b19b9 Alexander Potapenko 2022-09-15  310   * that constituted undefined behavior.
f80be4571b19b9 Alexander Potapenko 2022-09-15  311   */
62a9bbf2e999b9 Alexander Potapenko 2023-01-12  312  void __msan_warning(u32 origin);
f80be4571b19b9 Alexander Potapenko 2022-09-15  313  void __msan_warning(u32 origin)
f80be4571b19b9 Alexander Potapenko 2022-09-15  314  {
f80be4571b19b9 Alexander Potapenko 2022-09-15  315  	if (!kmsan_enabled || kmsan_in_runtime())
f80be4571b19b9 Alexander Potapenko 2022-09-15  316  		return;
f80be4571b19b9 Alexander Potapenko 2022-09-15  317  	kmsan_enter_runtime();
f80be4571b19b9 Alexander Potapenko 2022-09-15 @318  	kmsan_report(origin, /*address*/ 0, /*size*/ 0,
f80be4571b19b9 Alexander Potapenko 2022-09-15  319  		     /*off_first*/ 0, /*off_last*/ 0, /*user_addr*/ 0,
f80be4571b19b9 Alexander Potapenko 2022-09-15  320  		     REASON_ANY);
f80be4571b19b9 Alexander Potapenko 2022-09-15  321  	kmsan_leave_runtime();
f80be4571b19b9 Alexander Potapenko 2022-09-15  322  }
f80be4571b19b9 Alexander Potapenko 2022-09-15  323  EXPORT_SYMBOL(__msan_warning);
f80be4571b19b9 Alexander Potapenko 2022-09-15  324  

:::::: The code at line 318 was first introduced by commit
:::::: f80be4571b19b9fd8dd1528cd2a2f123aff51f70 kmsan: add KMSAN runtime core

:::::: TO: Alexander Potapenko <glider@xxxxxxxxxx>
:::::: CC: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux