All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [gustavoars-linux:for-next/Warray-bounds 3/3] include/uapi/linux/bcache.h:109:32: warning: '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
@ 2021-06-08  3:01 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-06-08  3:01 UTC (permalink / raw
  To: Gustavo A. R. Silva; +Cc: kbuild-all, Gustavo A. R. Silva, LKML

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git for-next/Warray-bounds
head:   12f0a8412db185d4fe79208083b373a0c02b6ee9
commit: 12f0a8412db185d4fe79208083b373a0c02b6ee9 [3/3] Makefile: Enable -Warray-bounds
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-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=12f0a8412db185d4fe79208083b373a0c02b6ee9
        git remote add gustavoars-linux https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git
        git fetch --no-tags gustavoars-linux for-next/Warray-bounds
        git checkout 12f0a8412db185d4fe79208083b373a0c02b6ee9
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32 

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 drivers/md/bcache/bcache.h:181,
                    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:
>> include/uapi/linux/bcache.h:109:32: warning: '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]
     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);
         |   ^~~~~~~~~
--
   drivers/media/platform/omap3isp/ispstat.c: In function 'omap3isp_stat_request_statistics_time32':
>> drivers/media/platform/omap3isp/ispstat.c:524:2: warning: 'memcpy' offset [21, 32] from the object at 'data64' is out of the bounds of referenced subobject 'buf' with type 'void *' at offset 16 [-Warray-bounds]
     524 |  memcpy(&data->buf, &data64.buf, sizeof(*data) - sizeof(data->ts));
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +109 include/uapi/linux/bcache.h

81ab4190ac17df Kent Overstreet 2013-10-31  108  
81ab4190ac17df Kent Overstreet 2013-10-31 @109  #define bkey_copy(_dest, _src)	memcpy(_dest, _src, bkey_bytes(_src))
81ab4190ac17df Kent Overstreet 2013-10-31  110  

:::::: The code at line 109 was first introduced by commit
:::::: 81ab4190ac17df41686a37c97f701623276b652a bcache: Pull on disk data structures out into a separate header

:::::: TO: Kent Overstreet <kmo@daterainc.com>
:::::: CC: Kent Overstreet <kmo@daterainc.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: 60587 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gustavoars-linux:for-next/Warray-bounds 3/3] include/uapi/linux/bcache.h:109:32: warning: '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
@ 2021-06-08  3:01 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-06-08  3:01 UTC (permalink / raw
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git for-next/Warray-bounds
head:   12f0a8412db185d4fe79208083b373a0c02b6ee9
commit: 12f0a8412db185d4fe79208083b373a0c02b6ee9 [3/3] Makefile: Enable -Warray-bounds
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-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=12f0a8412db185d4fe79208083b373a0c02b6ee9
        git remote add gustavoars-linux https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git
        git fetch --no-tags gustavoars-linux for-next/Warray-bounds
        git checkout 12f0a8412db185d4fe79208083b373a0c02b6ee9
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32 

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 drivers/md/bcache/bcache.h:181,
                    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:
>> include/uapi/linux/bcache.h:109:32: warning: '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]
     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);
         |   ^~~~~~~~~
--
   drivers/media/platform/omap3isp/ispstat.c: In function 'omap3isp_stat_request_statistics_time32':
>> drivers/media/platform/omap3isp/ispstat.c:524:2: warning: 'memcpy' offset [21, 32] from the object at 'data64' is out of the bounds of referenced subobject 'buf' with type 'void *' at offset 16 [-Warray-bounds]
     524 |  memcpy(&data->buf, &data64.buf, sizeof(*data) - sizeof(data->ts));
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +109 include/uapi/linux/bcache.h

81ab4190ac17df Kent Overstreet 2013-10-31  108  
81ab4190ac17df Kent Overstreet 2013-10-31 @109  #define bkey_copy(_dest, _src)	memcpy(_dest, _src, bkey_bytes(_src))
81ab4190ac17df Kent Overstreet 2013-10-31  110  

:::::: The code at line 109 was first introduced by commit
:::::: 81ab4190ac17df41686a37c97f701623276b652a bcache: Pull on disk data structures out into a separate header

:::::: TO: Kent Overstreet <kmo@daterainc.com>
:::::: CC: Kent Overstreet <kmo@daterainc.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 60587 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-08  3:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-08  3:01 [gustavoars-linux:for-next/Warray-bounds 3/3] include/uapi/linux/bcache.h:109:32: warning: '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 kernel test robot
2021-06-08  3:01 ` 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.