* [norov:gup 45/48] include/linux/bitmap.h:259:9: warning: 'memcpy' forming offset [20, 23] is out of the bounds [0, 20]
@ 2022-04-23 0:44 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-04-23 0:44 UTC (permalink / raw)
To: Yury Norov; +Cc: kbuild-all, linux-kernel
tree: https://github.com/norov/linux gup
head: c96226d23c745b114dc041e0d8d0c272b280c71a
commit: f1cbd19c47bf73d532ff30571601c7ede57d5f82 [45/48] lib: add bitmap_{from,to}_arr64
config: csky-randconfig-r021-20220422 (https://download.01.org/0day-ci/archive/20220423/202204230819.d6pbriaa-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/norov/linux/commit/f1cbd19c47bf73d532ff30571601c7ede57d5f82
git remote add norov https://github.com/norov/linux
git fetch --no-tags norov gup
git checkout f1cbd19c47bf73d532ff30571601c7ede57d5f82
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross W=1 O=build_dir ARCH=csky SHELL=/bin/bash net/bluetooth/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/cpumask.h:12,
from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/mutex.h:17,
from include/linux/rfkill.h:35,
from net/bluetooth/hci_core.c:29:
In function 'bitmap_copy',
inlined from 'bitmap_copy_clear_tail' at include/linux/bitmap.h:268:2,
inlined from 'bitmap_from_u64' at include/linux/bitmap.h:622:2,
inlined from 'hci_bdaddr_list_add_with_flags' at net/bluetooth/hci_core.c:2156:2:
>> include/linux/bitmap.h:259:9: warning: 'memcpy' forming offset [20, 23] is out of the bounds [0, 20] [-Warray-bounds]
259 | memcpy(dst, src, len);
| ^~~~~~~~~~~~~~~~~~~~~
vim +/memcpy +259 include/linux/bitmap.h
^1da177e4c3f41 Linus Torvalds 2005-04-16 254
^1da177e4c3f41 Linus Torvalds 2005-04-16 255 static inline void bitmap_copy(unsigned long *dst, const unsigned long *src,
8b4daad52fee77 Rasmus Villemoes 2015-02-12 256 unsigned int nbits)
^1da177e4c3f41 Linus Torvalds 2005-04-16 257 {
8b4daad52fee77 Rasmus Villemoes 2015-02-12 258 unsigned int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long);
^1da177e4c3f41 Linus Torvalds 2005-04-16 @259 memcpy(dst, src, len);
^1da177e4c3f41 Linus Torvalds 2005-04-16 260 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 261
:::::: The code at line 259 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-23 0:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-23 0:44 [norov:gup 45/48] include/linux/bitmap.h:259:9: warning: 'memcpy' forming offset [20, 23] is out of the bounds [0, 20] kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox