linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [gustavoars-linux:testing/uapi/nfsd/nfsfh 1/2] drivers/media/pci/ngene/ngene-core.c:388:2: warning: '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
@ 2021-02-09 22:24 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-02-09 22:24 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: kbuild-all, Gustavo A. R. Silva, LKML

[-- Attachment #1: Type: text/plain, Size: 3805 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/uapi/nfsd/nfsfh
head:   d28670226e028e65b0de5e6744c5df188fc2728b
commit: 5c976c3f03be89378ca672c1a3c7ce7048d90606 [1/2] Makefile: Enable -Warray-bounds
config: riscv-randconfig-r004-20210209 (attached as .config)
compiler: riscv64-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=5c976c3f03be89378ca672c1a3c7ce7048d90606
        git remote add gustavoars-linux https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git
        git fetch --no-tags gustavoars-linux testing/uapi/nfsd/nfsfh
        git checkout 5c976c3f03be89378ca672c1a3c7ce7048d90606
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv 

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 >>):

   drivers/media/pci/ngene/ngene-core.c: In function 'ngene_command_config_free_buf':
>> drivers/media/pci/ngene/ngene-core.c:388:2: warning: '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]
     388 |  memcpy(&com.cmd.ConfigureBuffers.config, config, 6);
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +388 drivers/media/pci/ngene/ngene-core.c

dae52d009fc950 drivers/media/dvb/ngene/ngene-core.c Matthias Benesch 2009-12-18  381  
dae52d009fc950 drivers/media/dvb/ngene/ngene-core.c Matthias Benesch 2009-12-18  382  static int ngene_command_config_free_buf(struct ngene *dev, u8 *config)
dae52d009fc950 drivers/media/dvb/ngene/ngene-core.c Matthias Benesch 2009-12-18  383  {
dae52d009fc950 drivers/media/dvb/ngene/ngene-core.c Matthias Benesch 2009-12-18  384  	struct ngene_command com;
dae52d009fc950 drivers/media/dvb/ngene/ngene-core.c Matthias Benesch 2009-12-18  385  
dae52d009fc950 drivers/media/dvb/ngene/ngene-core.c Matthias Benesch 2009-12-18  386  	com.cmd.hdr.Opcode = CMD_CONFIGURE_FREE_BUFFER;
dae52d009fc950 drivers/media/dvb/ngene/ngene-core.c Matthias Benesch 2009-12-18  387  	com.cmd.hdr.Length = 6;
dae52d009fc950 drivers/media/dvb/ngene/ngene-core.c Matthias Benesch 2009-12-18 @388  	memcpy(&com.cmd.ConfigureBuffers.config, config, 6);
dae52d009fc950 drivers/media/dvb/ngene/ngene-core.c Matthias Benesch 2009-12-18  389  	com.in_len = 6;
dae52d009fc950 drivers/media/dvb/ngene/ngene-core.c Matthias Benesch 2009-12-18  390  	com.out_len = 0;
dae52d009fc950 drivers/media/dvb/ngene/ngene-core.c Matthias Benesch 2009-12-18  391  
dae52d009fc950 drivers/media/dvb/ngene/ngene-core.c Matthias Benesch 2009-12-18  392  	if (ngene_command(dev, &com) < 0)
dae52d009fc950 drivers/media/dvb/ngene/ngene-core.c Matthias Benesch 2009-12-18  393  		return -EIO;
dae52d009fc950 drivers/media/dvb/ngene/ngene-core.c Matthias Benesch 2009-12-18  394  
dae52d009fc950 drivers/media/dvb/ngene/ngene-core.c Matthias Benesch 2009-12-18  395  	return 0;
dae52d009fc950 drivers/media/dvb/ngene/ngene-core.c Matthias Benesch 2009-12-18  396  }
dae52d009fc950 drivers/media/dvb/ngene/ngene-core.c Matthias Benesch 2009-12-18  397  

:::::: The code at line 388 was first introduced by commit
:::::: dae52d009fc950b5c209260d50fcc000f5becd3c V4L/DVB: ngene: Initial check-in

:::::: TO: Matthias Benesch <twoof7@freenet.de>
:::::: CC: Mauro Carvalho Chehab <mchehab@redhat.com>

---
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: 24308 bytes --]

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

only message in thread, other threads:[~2021-02-10  1:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09 22:24 [gustavoars-linux:testing/uapi/nfsd/nfsfh 1/2] drivers/media/pci/ngene/ngene-core.c:388:2: warning: '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 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;
as well as URLs for NNTP newsgroup(s).