diff options
author | Andrey Ryabinin <ryabinin.a.a@gmail.com> | 2015-09-29 12:40:14 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-09-30 03:29:53 -0400 |
commit | 4ac86a6dcec1c3878de9747bf5a2aa4455be69e3 (patch) | |
tree | 1e55cf87959a74ccfde3c890b2a7d80db962294c | |
parent | ccf79c238f1a06a801b4c4449b9bc8a42be2c7bc (diff) |
x86, efi, kasan: Fix build failure on !KASAN && KMEMCHECK=y kernels
With KMEMCHECK=y, KASAN=n we get this build failure:
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.
Reported-by: Ingo Molnar <mingo@kernel.org>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt.fleming@intel.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 769a8089c1fd ("x86, efi, kasan: #undef memset/memcpy/memmove per arch")
Link: http://lkml.kernel.org/r/1443544814-20122-1-git-send-email-ryabinin.a.a@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/x86/include/asm/efi.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h index ab5f1d447ef9..ae68be92f755 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, ...); | |||
86 | extern void __iomem *__init efi_ioremap(unsigned long addr, unsigned long size, | 86 | extern void __iomem *__init efi_ioremap(unsigned long addr, unsigned long size, |
87 | u32 type, u64 attribute); | 87 | u32 type, u64 attribute); |
88 | 88 | ||
89 | #ifdef CONFIG_KASAN | ||
89 | /* | 90 | /* |
90 | * CONFIG_KASAN may redefine memset to __memset. __memset function is present | 91 | * CONFIG_KASAN may redefine memset to __memset. __memset function is present |
91 | * only in kernel binary. Since the EFI stub linked into a separate binary it | 92 | * 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, | |||
95 | #undef memcpy | 96 | #undef memcpy |
96 | #undef memset | 97 | #undef memset |
97 | #undef memmove | 98 | #undef memmove |
99 | #endif | ||
98 | 100 | ||
99 | #endif /* CONFIG_X86_32 */ | 101 | #endif /* CONFIG_X86_32 */ |
100 | 102 | ||