From: kernel test robot <lkp@intel.com>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: kbuild-all@lists.01.org,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: [gustavoars-linux:testing/warray-bounds 1/13] arch/alpha/include/asm/string.h:22:16: warning: '__builtin_memcpy' offset [3, 7] from the object at 'cmd' is out of the bounds of referenced subobject 'feature' with type 'unsigned char' at offset 1
Date: Fri, 16 Apr 2021 08:55:30 +0800 [thread overview]
Message-ID: <202104160817.a5FOA0xa-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5841 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/warray-bounds
head: 8bd0f043b3e94069930bec5cb3fbb5c857748c80
commit: 5f8bd90197ff7ab1cf9f06dd9c594f3636c71297 [1/13] Makefile: Enable -Warray-bounds
config: alpha-randconfig-r013-20210415 (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=5f8bd90197ff7ab1cf9f06dd9c594f3636c71297
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 5f8bd90197ff7ab1cf9f06dd9c594f3636c71297
# 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/spinlock.h:59,
from include/linux/ipc.h:5,
from include/uapi/linux/sem.h:5,
from include/linux/sem.h:5,
from include/linux/compat.h:14,
from drivers/ide/ide-ioctls.c:6:
In function 'ide_task_ioctl',
inlined from 'generic_ide_ioctl' at drivers/ide/ide-ioctls.c:287:10:
>> arch/alpha/include/asm/string.h:22:16: warning: '__builtin_memcpy' offset [3, 7] from the object at 'cmd' is out of the bounds of referenced subobject 'feature' with type 'unsigned char' at offset 1 [-Warray-bounds]
22 | #define memcpy __builtin_memcpy
drivers/ide/ide-ioctls.c:213:2: note: in expansion of macro 'memcpy'
213 | memcpy(&cmd.tf.feature, &args[1], 6);
| ^~~~~~
>> arch/alpha/include/asm/string.h:22:16: warning: '__builtin_memcpy' offset [3, 7] from the object at 'cmd' is out of the bounds of referenced subobject 'feature' with type 'unsigned char' at offset 1 [-Warray-bounds]
22 | #define memcpy __builtin_memcpy
drivers/ide/ide-ioctls.c:221:2: note: in expansion of macro 'memcpy'
221 | memcpy(&args[1], &cmd.tf.feature, 6);
| ^~~~~~
--
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/spinlock.h:59,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/linux/highmem.h:5,
from include/linux/bio.h:8,
from drivers/md/bcache/bcache.h:182,
from drivers/md/bcache/alloc.c:64:
In function 'pick_data_bucket',
inlined from 'bch_alloc_sectors' at drivers/md/bcache/alloc.c:627:15:
>> arch/alpha/include/asm/string.h:22:16: warning: '__builtin_memcpy' offset [17, 24] from the object at 'alloc' is out of the bounds of referenced subobject 'key' with type 'struct bkey' at offset 0 [-Warray-bounds]
22 | #define memcpy __builtin_memcpy
include/uapi/linux/bcache.h:109:32: note: in expansion of macro 'memcpy'
109 | #define bkey_copy(_dest, _src) memcpy(_dest, _src, bkey_bytes(_src))
| ^~~~~~
drivers/md/bcache/alloc.c:586:3: note: in expansion of macro 'bkey_copy'
586 | bkey_copy(&ret->key, alloc);
| ^~~~~~~~~
--
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/spinlock.h:59,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/media/pci/ngene/ngene-core.c:13:
drivers/media/pci/ngene/ngene-core.c: In function 'ngene_command_config_free_buf':
>> arch/alpha/include/asm/string.h:22:16: warning: '__builtin_memcpy' offset [12, 16] from the object at 'com' is out of the bounds of referenced subobject 'config' with type 'unsigned char' at offset 10 [-Warray-bounds]
22 | #define memcpy __builtin_memcpy
drivers/media/pci/ngene/ngene-core.c:388:2: note: in expansion of macro 'memcpy'
388 | memcpy(&com.cmd.ConfigureBuffers.config, config, 6);
| ^~~~~~
vim +22 arch/alpha/include/asm/string.h
^1da177e4c3f415 include/asm-alpha/string.h Linus Torvalds 2005-04-16 21
^1da177e4c3f415 include/asm-alpha/string.h Linus Torvalds 2005-04-16 @22 #define memcpy __builtin_memcpy
^1da177e4c3f415 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
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27467 bytes --]
reply other threads:[~2021-04-16 0:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202104160817.a5FOA0xa-lkp@intel.com \
--to=lkp@intel.com \
--cc=gustavo@embeddedor.com \
--cc=gustavoars@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox