lkml.org 
[lkml]   [2021]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[gustavoars-linux:testing/warray-bounds 1/10] arch/alpha/include/asm/string.h:22:16: warning: '__builtin_memcpy' offset [3, 64] from the object at 'report' is out of the bounds of referenced subobject 'report' with type 'unsigned char' at offset 1
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/warray-bounds
head: 4695107c157dd670a5fc1b1d3ccbfdc440caca24
commit: 06f7d86a7f517e6ce30162d18a7eef3ed192282a [1/10] Makefile: Enable -Warray-bounds
config: alpha-randconfig-r032-20210414 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.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://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/commit/?id=06f7d86a7f517e6ce30162d18a7eef3ed192282a
git remote add gustavoars-linux https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git
git fetch --no-tags gustavoars-linux testing/warray-bounds
git checkout 06f7d86a7f517e6ce30162d18a7eef3ed192282a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=alpha

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/string.h:21,
from include/linux/bitmap.h:10,
from include/linux/cpumask.h:12,
from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/rcupdate.h:29,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/gpio/driver.h:5,
from drivers/hid/hid-cp2112.c:21:
In function 'cp2112_hid_get',
inlined from 'pstr_show' at drivers/hid/hid-cp2112.c:989:8:
>> arch/alpha/include/asm/string.h:22:16: warning: '__builtin_memcpy' offset [3, 64] from the object at 'report' is out of the bounds of referenced subobject 'report' with type 'unsigned char' at offset 1 [-Warray-bounds]
22 | #define memcpy __builtin_memcpy
drivers/hid/hid-cp2112.c:333:2: note: in expansion of macro 'memcpy'
333 | memcpy(data, buf, count);
| ^~~~~~


vim +22 arch/alpha/include/asm/string.h

^1da177e4c3f41 include/asm-alpha/string.h Linus Torvalds 2005-04-16 21
^1da177e4c3f41 include/asm-alpha/string.h Linus Torvalds 2005-04-16 @22 #define memcpy __builtin_memcpy
^1da177e4c3f41 include/asm-alpha/string.h Linus Torvalds 2005-04-16 23

:::::: The code at line 22 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, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-04-15 02:41    [W:0.018 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site