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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 30 Sep 2015 09:50:46 +0200
From:	Sedat Dilek <sedat.dilek@...il.com>
To:	Andrey Ryabinin <ryabinin.a.a@...il.com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	"the arch/x86 maintainers" <x86@...nel.org>,
	Matt Fleming <matt.fleming@...el.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: fix build failure

On Wed, Sep 30, 2015 at 8:55 AM, Sedat Dilek <sedat.dilek@...il.com> wrote:
> On Tue, Sep 29, 2015 at 8:59 PM, Sedat Dilek <sedat.dilek@...il.com> wrote:
>> On Tue, Sep 29, 2015 at 6:40 PM, Andrey Ryabinin <ryabinin.a.a@...il.com> wrote:
>>> With KMEMCHECK=y, KASAN=n:
>>>
>>> arch/x86/platform/efi/efi.c:673:3: error: implicit declaration of function ‘memcpy’ [-Werror=implicit-function-declaration]
>>> arch/x86/platform/efi/efi_64.c:139:2: error: implicit declaration of function ‘memcpy’ [-Werror=implicit-function-declaration]
>>> arch/x86/include/asm/desc.h:121:2: error: implicit declaration of function ‘memcpy’ [-Werror=implicit-function-declaration]
>>>
>>> Don't #undef memcpy if KASAN=n.
>>>
>>
>> Good catch.
>> This broke my llvmlinux-patches Linux v4.3-rcN.
>>
>> The subject-line is not very meaningful - to me at least ?
>>
>
> What about...?
>
> "x86, efi, kasan: Fix error implicit declaration of memcpy"
>
> "x86, efi, kasan: Add missing CONFIG_KASAN check for #undef
> memset/memcpy/memmove"
>

I tested this with latest llvmlinux kernel and it looks good...

$ grep 'kernel/setup.o' build-log_4.3.0-rc3-10-llvmlinux-amd64.txt
  CC      arch/x86/kernel/setup.o

Feel free to add my...

    Tested-by: Sedat Dilek <sedat.dilek@...il.com>

...when you do a v2.

Thanks.

- Sedat -

> - Sedat -
>
>> - Sedat -
>>
>>> Reported-by: Ingo Molnar <mingo@...nel.org>
>>> Reported-by: Sedat Dilek <sedat.dilek@...il.com>
>>> Fixes: 769a8089c1fd ("x86, efi, kasan: #undef memset/memcpy/memmove per arch")
>>> Signed-off-by: Andrey Ryabinin <ryabinin.a.a@...il.com>
>>> ---
>>>  arch/x86/include/asm/efi.h | 2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
>>> index ab5f1d4..ae68be9 100644
>>> --- a/arch/x86/include/asm/efi.h
>>> +++ b/arch/x86/include/asm/efi.h
>>> @@ -86,6 +86,7 @@ extern u64 asmlinkage efi_call(void *fp, ...);
>>>  extern void __iomem *__init efi_ioremap(unsigned long addr, unsigned long size,
>>>                                         u32 type, u64 attribute);
>>>
>>> +#ifdef CONFIG_KASAN
>>>  /*
>>>   * CONFIG_KASAN may redefine memset to __memset.  __memset function is present
>>>   * only in kernel binary.  Since the EFI stub linked into a separate binary it
>>> @@ -95,6 +96,7 @@ extern void __iomem *__init efi_ioremap(unsigned long addr, unsigned long size,
>>>  #undef memcpy
>>>  #undef memset
>>>  #undef memmove
>>> +#endif
>>>
>>>  #endif /* CONFIG_X86_32 */
>>>
>>> --
>>> 2.4.6
>>>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ