public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Emil Renner Berthing <kernel@esmil.dk>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [esmil:visionfive 55/56] mm/kasan/shadow.c:69:16: error: implicit declaration of function '__memcpy'; did you mean 'memcpy'?
Date: Sun, 24 Apr 2022 12:51:42 +0800	[thread overview]
Message-ID: <202204241255.IvPnAd0Y-lkp@intel.com> (raw)

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@intel.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@google.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

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

                 reply	other threads:[~2022-04-24  4: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=202204241255.IvPnAd0Y-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kernel@esmil.dk \
    --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