From: Andrey Ryabinin <ryabinin.a.a@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: kbuild test robot <fengguang.wu@intel.com>,
kbuild-all@01.org, Andrey Konovalov <adech.fo@gmail.com>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: drivers/firmware/efi/libstub/efi-stub-helper.c:599:2: warning: implicit declaration of function 'memcpy'
Date: Thu, 17 Sep 2015 23:02:14 +0300 [thread overview]
Message-ID: <CAPAsAGyFs7dc1AvUweJ6_KPjoK8qMELDnyOfmNSX-urr7Nnhww@mail.gmail.com> (raw)
In-Reply-To: <20150917123751.772410664187565ba24171a5@linux-foundation.org>
2015-09-17 22:37 GMT+03:00 Andrew Morton <akpm@linux-foundation.org>:
> On Thu, 17 Sep 2015 09:17:56 +0800 kbuild test robot <fengguang.wu@intel.com> wrote:
>
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head: 72714841b705a5b9bccf37ee85a62352bee3a3ef
>> commit: 393f203f5fd54421fddb1e2a263f64d3876eeadb x86_64: kasan: add interceptors for memset/memmove/memcpy functions
>> date: 7 months ago
>> config: i386-randconfig-i0-201537 (attached as .config)
>> reproduce:
>> git checkout 393f203f5fd54421fddb1e2a263f64d3876eeadb
>> # save the attached .config to linux build tree
>> make ARCH=i386
>>
>> All warnings (new ones prefixed by >>):
>>
>> drivers/firmware/efi/libstub/efi-stub-helper.c: In function 'efi_relocate_kernel':
>> >> drivers/firmware/efi/libstub/efi-stub-helper.c:599:2: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
>> memcpy((void *)new_addr, (void *)cur_image_addr, image_size);
>
> I can't reproduce this.
>
> But whatever. I'll do this:
>
> --- a/drivers/firmware/efi/libstub/efi-stub-helper.c~drivers-firmware-efi-libstub-efi-stub-helperc-needs-stringh
> +++ a/drivers/firmware/efi/libstub/efi-stub-helper.c
> @@ -11,6 +11,7 @@
> */
>
> #include <linux/efi.h>
> +#include <linux/string.h>
This won't help.
arch/x86/include/asm/string_32.h has several variants of #define memcpy()
But it doesn't have declaration of memcpy function like:
void memcpy(const void *to, const void *from, size_t len);
Thus '#undef memcpy' causes this warning, and including
<linux/string.h> won't help (It probably already included)
Patch from KASAN for arm64 series:
http://marc.info/?l=linux-mm&m=144248270719929&w=2 ([PATCH v6 3/6]
x86, efi, kasan: #undef memset/memcpy/memmove per arch.)
should fix this warning, as it moves '#undef memcpy' under #ifdef
X86_64 in arch/x86/include/asm/efi.h
> #include <asm/efi.h>
>
> #include "efistub.h"
> _
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-09-17 20:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-17 1:17 kbuild test robot
2015-09-17 19:37 ` Andrew Morton
2015-09-17 20:02 ` Andrey Ryabinin [this message]
2015-09-17 20:15 ` Andrew Morton
2015-09-17 20:28 ` Andrey Ryabinin
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=CAPAsAGyFs7dc1AvUweJ6_KPjoK8qMELDnyOfmNSX-urr7Nnhww@mail.gmail.com \
--to=ryabinin.a.a@gmail.com \
--cc=adech.fo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=fengguang.wu@intel.com \
--cc=kbuild-all@01.org \
--cc=linux-mm@kvack.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