:::::: 
:::::: Manual check reason: "low confidence static check first_new_problem: 
include/net/bluetooth/bluetooth.h:347:16: warning: 'memcmp' specified bound 6 
exceeds source size 0 [-Wstringop-overread]"
:::::: 

BCC: [email protected]
CC: [email protected]
CC: Linux Memory Management List <[email protected]>
TO: Luiz Augusto von Dentz <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 
pending-fixes
head:   5c5775c41d5494a213623a99b8ba1a7679efd79f
commit: 332f1795ca202489c665a75e62e18ff6284de077 [13358/13464] Bluetooth: 
L2CAP: Fix l2cap_global_chan_by_psm regression
:::::: branch date: 9 hours ago
:::::: commit date: 32 hours ago
config: powerpc-randconfig-s051-20220810 
(https://download.01.org/0day-ci/archive/20220810/[email protected]/config)
compiler: powerpc-linux-gcc (GCC) 12.1.0
reproduce:
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=332f1795ca202489c665a75e62e18ff6284de077
        git remote add linux-next 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next pending-fixes
        git checkout 332f1795ca202489c665a75e62e18ff6284de077
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=powerpc 
SHELL=/bin/bash net/bluetooth/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>

All warnings (new ones prefixed by >>):

   In file included from net/bluetooth/l2cap_core.c:37:
   In function 'bacmp',
       inlined from 'l2cap_global_chan_by_psm' at 
net/bluetooth/l2cap_core.c:2003:15:
>> include/net/bluetooth/bluetooth.h:347:16: warning: 'memcmp' specified bound 
>> 6 exceeds source size 0 [-Wstringop-overread]
     347 |         return memcmp(ba1, ba2, sizeof(bdaddr_t));
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In function 'bacmp',
       inlined from 'l2cap_global_chan_by_psm' at 
net/bluetooth/l2cap_core.c:2004:15:
>> include/net/bluetooth/bluetooth.h:347:16: warning: 'memcmp' specified bound 
>> 6 exceeds source size 0 [-Wstringop-overread]
     347 |         return memcmp(ba1, ba2, sizeof(bdaddr_t));
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/memcmp +347 include/net/bluetooth/bluetooth.h

^1da177e4c3f41 Linus Torvalds 2005-04-16  343  
^1da177e4c3f41 Linus Torvalds 2005-04-16  344  /* Copy, swap, convert BD 
Address */
f53c20e93612f7 David Herrmann 2013-04-06  345  static inline int bacmp(const 
bdaddr_t *ba1, const bdaddr_t *ba2)
^1da177e4c3f41 Linus Torvalds 2005-04-16  346  {
^1da177e4c3f41 Linus Torvalds 2005-04-16 @347   return memcmp(ba1, ba2, 
sizeof(bdaddr_t));
^1da177e4c3f41 Linus Torvalds 2005-04-16  348  }
f53c20e93612f7 David Herrmann 2013-04-06  349  static inline void 
bacpy(bdaddr_t *dst, const bdaddr_t *src)
^1da177e4c3f41 Linus Torvalds 2005-04-16  350  {
^1da177e4c3f41 Linus Torvalds 2005-04-16  351   memcpy(dst, src, 
sizeof(bdaddr_t));
^1da177e4c3f41 Linus Torvalds 2005-04-16  352  }
^1da177e4c3f41 Linus Torvalds 2005-04-16  353  

:::::: The code at line 347 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <[email protected]>
:::::: CC: Linus Torvalds <[email protected]>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to