lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202204241255.IvPnAd0Y-lkp@intel.com>
Date:   Sun, 24 Apr 2022 12:51:42 +0800
From:   kernel test robot <lkp@...el.com>
To:     Emil Renner Berthing <kernel@...il.dk>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [esmil:visionfive 55/56] mm/kasan/shadow.c:69:16: error: implicit
 declaration of function '__memcpy'; did you mean 'memcpy'?

tree:   https://github.com/esmil/linux visionfive
head:   0729a282564fe3940277937536b1e67f98885c49
commit: 5e9aafc7c7b6e7aef5f6285688311fdea914a385 [55/56] riscv: Fix no previous prototype warning
config: riscv-randconfig-m031-20220424 (https://download.01.org/0day-ci/archive/20220424/202204241255.IvPnAd0Y-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 11.2.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://github.com/esmil/linux/commit/5e9aafc7c7b6e7aef5f6285688311fdea914a385
        git remote add esmil https://github.com/esmil/linux
        git fetch --no-tags esmil visionfive
        git checkout 5e9aafc7c7b6e7aef5f6285688311fdea914a385
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash mm/kasan/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All error/warnings (new ones prefixed by >>):

   mm/kasan/common.c: In function '__kasan_init_slab_obj':
>> mm/kasan/common.c:319:25: error: implicit declaration of function '__memset'; did you mean 'memset'? [-Werror=implicit-function-declaration]
     319 |                         __memset(alloc_meta, 0, sizeof(*alloc_meta));
         |                         ^~~~~~~~
         |                         memset
   cc1: some warnings being treated as errors
--
   mm/kasan/generic.c: In function '__asan_set_shadow_00':
>> mm/kasan/generic.c:320:17: error: implicit declaration of function '__memset'; did you mean 'memset'? [-Werror=implicit-function-declaration]
     320 |                 __memset((void *)addr, 0x##byte, size);                 \
         |                 ^~~~~~~~
   mm/kasan/generic.c:324:1: note: in expansion of macro 'DEFINE_ASAN_SET_SHADOW'
     324 | DEFINE_ASAN_SET_SHADOW(00);
         | ^~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   mm/kasan/shadow.c: In function 'memset':
>> mm/kasan/shadow.c:47:16: error: implicit declaration of function '__memset'; did you mean 'memset'? [-Werror=implicit-function-declaration]
      47 |         return __memset(addr, c, len);
         |                ^~~~~~~~
         |                memset
>> mm/kasan/shadow.c:47:16: warning: returning 'int' from a function with return type 'void *' makes pointer from integer without a cast [-Wint-conversion]
      47 |         return __memset(addr, c, len);
         |                ^~~~~~~~~~~~~~~~~~~~~~
   mm/kasan/shadow.c: In function 'memcpy':
>> mm/kasan/shadow.c:69:16: error: implicit declaration of function '__memcpy'; did you mean 'memcpy'? [-Werror=implicit-function-declaration]
      69 |         return __memcpy(dest, src, len);
         |                ^~~~~~~~
         |                memcpy
   mm/kasan/shadow.c:69:16: warning: returning 'int' from a function with return type 'void *' makes pointer from integer without a cast [-Wint-conversion]
      69 |         return __memcpy(dest, src, len);
         |                ^~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +69 mm/kasan/shadow.c

bb359dbcb70085 Andrey Konovalov 2020-12-22  40  
bb359dbcb70085 Andrey Konovalov 2020-12-22  41  #undef memset
bb359dbcb70085 Andrey Konovalov 2020-12-22  42  void *memset(void *addr, int c, size_t len)
bb359dbcb70085 Andrey Konovalov 2020-12-22  43  {
f00748bfa0246c Andrey Konovalov 2021-02-24  44  	if (!kasan_check_range((unsigned long)addr, len, true, _RET_IP_))
bb359dbcb70085 Andrey Konovalov 2020-12-22  45  		return NULL;
bb359dbcb70085 Andrey Konovalov 2020-12-22  46  
bb359dbcb70085 Andrey Konovalov 2020-12-22 @47  	return __memset(addr, c, len);
bb359dbcb70085 Andrey Konovalov 2020-12-22  48  }
bb359dbcb70085 Andrey Konovalov 2020-12-22  49  
bb359dbcb70085 Andrey Konovalov 2020-12-22  50  #ifdef __HAVE_ARCH_MEMMOVE
bb359dbcb70085 Andrey Konovalov 2020-12-22  51  #undef memmove
bb359dbcb70085 Andrey Konovalov 2020-12-22  52  void *memmove(void *dest, const void *src, size_t len)
bb359dbcb70085 Andrey Konovalov 2020-12-22  53  {
f00748bfa0246c Andrey Konovalov 2021-02-24  54  	if (!kasan_check_range((unsigned long)src, len, false, _RET_IP_) ||
f00748bfa0246c Andrey Konovalov 2021-02-24  55  	    !kasan_check_range((unsigned long)dest, len, true, _RET_IP_))
bb359dbcb70085 Andrey Konovalov 2020-12-22  56  		return NULL;
bb359dbcb70085 Andrey Konovalov 2020-12-22  57  
bb359dbcb70085 Andrey Konovalov 2020-12-22  58  	return __memmove(dest, src, len);
bb359dbcb70085 Andrey Konovalov 2020-12-22  59  }
bb359dbcb70085 Andrey Konovalov 2020-12-22  60  #endif
bb359dbcb70085 Andrey Konovalov 2020-12-22  61  
bb359dbcb70085 Andrey Konovalov 2020-12-22  62  #undef memcpy
bb359dbcb70085 Andrey Konovalov 2020-12-22  63  void *memcpy(void *dest, const void *src, size_t len)
bb359dbcb70085 Andrey Konovalov 2020-12-22  64  {
f00748bfa0246c Andrey Konovalov 2021-02-24  65  	if (!kasan_check_range((unsigned long)src, len, false, _RET_IP_) ||
f00748bfa0246c Andrey Konovalov 2021-02-24  66  	    !kasan_check_range((unsigned long)dest, len, true, _RET_IP_))
bb359dbcb70085 Andrey Konovalov 2020-12-22  67  		return NULL;
bb359dbcb70085 Andrey Konovalov 2020-12-22  68  
bb359dbcb70085 Andrey Konovalov 2020-12-22 @69  	return __memcpy(dest, src, len);
bb359dbcb70085 Andrey Konovalov 2020-12-22  70  }
bb359dbcb70085 Andrey Konovalov 2020-12-22  71  

:::::: The code at line 69 was first introduced by commit
:::::: bb359dbcb70085a63e8bdbf14837a900750f0cf7 kasan: split out shadow.c from common.c

:::::: TO: Andrey Konovalov <andreyknvl@...gle.com>
:::::: CC: Linus Torvalds <torvalds@...ux-foundation.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ