remarkable-linux/drivers/firmware/efi
Andrey Ryabinin 769a8089c1 x86, efi, kasan: #undef memset/memcpy/memmove per arch
In not-instrumented code KASAN replaces instrumented memset/memcpy/memmove
with not-instrumented analogues __memset/__memcpy/__memove.

However, on x86 the EFI stub is not linked with the kernel.  It uses
not-instrumented mem*() functions from arch/x86/boot/compressed/string.c

So we don't replace them with __mem*() variants in EFI stub.

On ARM64 the EFI stub is linked with the kernel, so we should replace
mem*() functions with __mem*(), because the EFI stub runs before KASAN
sets up early shadow.

So let's move these #undef mem* into arch's asm/efi.h which is also
included by the EFI stub.

Also, this will fix the warning in 32-bit build reported by kbuild test
robot:

	efi-stub-helper.c:599:2: warning: implicit declaration of function 'memcpy'

[akpm@linux-foundation.org: use 80 cols in comment]
Signed-off-by: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Reported-by: Fengguang Wu <fengguang.wu@gmail.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Matt Fleming <matt.fleming@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-09-22 15:09:53 -07:00
..
libstub x86, efi, kasan: #undef memset/memcpy/memmove per arch 2015-09-22 15:09:53 -07:00
cper.c efi: Handle memory error structures produced based on old versions of standard 2015-07-15 13:30:38 +01:00
efi-pstore.c efi-pstore: Fix an overflow on 32-bit builds 2014-06-27 07:30:32 +01:00
efi.c efi: Check for NULL efi kernel parameters 2015-07-30 18:07:11 +01:00
efivars.c efi: efivar_create_sysfs_entry() should return negative error codes 2015-04-30 22:15:03 +01:00
esrt.c efi/esrt: Fix some compiler warnings 2015-04-30 22:15:06 +01:00
Kconfig kexec: split kexec_load syscall from kexec core code 2015-09-10 13:29:01 -07:00
Makefile efi: Work around ia64 build problem with ESRT driver 2015-06-08 10:51:31 +01:00
reboot.c x86/reboot: Add EFI reboot quirk for ACPI Hardware Reduced flag 2014-07-18 21:23:52 +01:00
runtime-map.c efi: Fix error handling in add_sysfs_runtime_map_entry() 2015-05-05 16:20:13 +01:00
runtime-wrappers.c efi: Delete the in_nmi() conditional runtime locking 2014-10-03 18:41:03 +01:00
vars.c Merge branch 'next' into efi-next-merge 2014-10-03 22:15:56 +01:00