All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 7021/9870] include/linux/kasan-checks.h:38:27: warning: 'args' may be used uninitialized
@ 2026-06-01  3:46 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-06-01  3:46 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "likely FALSE maybe-used-uninitialized warning on old compiler"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Mark Harmstone <mark@harmstone.com>
CC: David Sterba <dsterba@suse.com>
CC: Qu Wenruo <wqu@suse.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   7da7f07112610a520567421dd2ffcb51beaefbcc
commit: 3af8c1874c4203ff8a960333e871df58255e6c37 [7021/9870] btrfs: add ioctl GET_CSUMS to read raw checksums from file range
:::::: branch date: 2 days ago
:::::: commit date: 8 days ago
config: arm64-randconfig-004-20260601 (https://download.01.org/0day-ci/archive/20260601/202606011125.SbcePutL-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260601/202606011125.SbcePutL-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/r/202606011125.SbcePutL-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/asm-generic/rwonce.h:26,
                    from arch/arm64/include/asm/rwonce.h:81,
                    from include/linux/compiler.h:369,
                    from include/linux/array_size.h:5,
                    from include/linux/kernel.h:16,
                    from fs/btrfs/ioctl.c:6:
   In function 'instrument_copy_from_user_before',
       inlined from '_inline_copy_from_user' at include/linux/uaccess.h:184:2,
       inlined from 'copy_from_user' at include/linux/uaccess.h:221:9,
       inlined from 'btrfs_ioctl_get_csums.isra' at fs/btrfs/ioctl.c:5140:6:
>> include/linux/kasan-checks.h:38:27: warning: 'args' may be used uninitialized [-Wmaybe-uninitialized]
      38 | #define kasan_check_write __kasan_check_write
   include/linux/instrumented.h:146:9: note: in expansion of macro 'kasan_check_write'
     146 |         kasan_check_write(to, n);
         |         ^~~~~~~~~~~~~~~~~
   include/linux/kasan-checks.h: In function 'btrfs_ioctl_get_csums.isra':
   include/linux/kasan-checks.h:20:6: note: by argument 1 of type 'const volatile void *' to '__kasan_check_write' declared here
      20 | bool __kasan_check_write(const volatile void *p, unsigned int size);
         |      ^~~~~~~~~~~~~~~~~~~
   fs/btrfs/ioctl.c:5121:43: note: 'args' declared here
    5121 |         struct btrfs_ioctl_get_csums_args args;
         |                                           ^~~~


vim +/args +38 include/linux/kasan-checks.h

7d8ad890dad00f6 Marco Elver     2019-07-11  31  
7d8ad890dad00f6 Marco Elver     2019-07-11  32  /*
7d8ad890dad00f6 Marco Elver     2019-07-11  33   * kasan_check_*: Only available when the particular compilation unit has KASAN
7d8ad890dad00f6 Marco Elver     2019-07-11  34   * instrumentation enabled. May be used in header files.
7d8ad890dad00f6 Marco Elver     2019-07-11  35   */
7d8ad890dad00f6 Marco Elver     2019-07-11  36  #ifdef __SANITIZE_ADDRESS__
7d8ad890dad00f6 Marco Elver     2019-07-11  37  #define kasan_check_read __kasan_check_read
7d8ad890dad00f6 Marco Elver     2019-07-11 @38  #define kasan_check_write __kasan_check_write
64f8ebaf115bcdd Andrey Ryabinin 2016-05-20  39  #else
b5f6e0fc7d60e02 Marco Elver     2019-07-11  40  static inline bool kasan_check_read(const volatile void *p, unsigned int size)
b5f6e0fc7d60e02 Marco Elver     2019-07-11  41  {
b5f6e0fc7d60e02 Marco Elver     2019-07-11  42  	return true;
b5f6e0fc7d60e02 Marco Elver     2019-07-11  43  }
b5f6e0fc7d60e02 Marco Elver     2019-07-11  44  static inline bool kasan_check_write(const volatile void *p, unsigned int size)
b5f6e0fc7d60e02 Marco Elver     2019-07-11  45  {
b5f6e0fc7d60e02 Marco Elver     2019-07-11  46  	return true;
b5f6e0fc7d60e02 Marco Elver     2019-07-11  47  }
64f8ebaf115bcdd Andrey Ryabinin 2016-05-20  48  #endif
64f8ebaf115bcdd Andrey Ryabinin 2016-05-20  49  

:::::: The code at line 38 was first introduced by commit
:::::: 7d8ad890dad00f6cd64bfb44d9be4fceb10cf819 mm/kasan: introduce __kasan_check_{read,write}

:::::: TO: Marco Elver <elver@google.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-01  3:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-01  3:46 [linux-next:master 7021/9870] include/linux/kasan-checks.h:38:27: warning: 'args' may be used uninitialized kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.