linux/arch/loongarch
Ard Biesheuvel c82ceb440b efi/libstub: use EFI provided memcpy/memset routines
The stub is used in different execution environments, but on arm64,
RISC-V and LoongArch, we still use the core kernel's implementation of
memcpy and memset, as they are just a branch instruction away, and can
generally be reused even from code such as the EFI stub that runs in a
completely different address space.

KAsan complicates this slightly, resulting in the need for some hacks to
expose the uninstrumented, __ prefixed versions as the normal ones, as
the latter are instrumented to include the KAsan checks, which only work
in the core kernel.

Unfortunately, #define'ing memcpy to __memcpy when building C code does
not guarantee that no explicit memcpy() calls will be emitted. And with
the upcoming zboot support, which consists of a separate binary which
therefore needs its own implementation of memcpy/memset anyway, it's
better to provide one explicitly instead of linking to the existing one.

Given that EFI exposes implementations of memmove() and memset() via the
boot services table, let's wire those up in the appropriate way, and
drop the references to the core kernel ones.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2022-09-17 15:13:21 +02:00
..
boot efi/loongarch: Add efistub booting support 2022-09-06 11:19:34 +02:00
configs LoongArch: Update Loongson-3 default config file 2022-08-12 13:10:11 +08:00
include efi/loongarch: Add efistub booting support 2022-09-06 11:19:34 +02:00
kernel efi/libstub: use EFI provided memcpy/memset routines 2022-09-17 15:13:21 +02:00
lib LoongArch: Remove useless header compiler.h 2022-07-29 18:22:32 +08:00
mm - The usual batches of cleanups from Baoquan He, Muchun Song, Miaohe 2022-08-05 16:32:45 -07:00
pci LoongArch: Add PCI controller support 2022-08-12 13:10:11 +08:00
vdso LoongArch: Add vDSO syscall __vdso_getcpu() 2022-08-12 13:10:11 +08:00
Kbuild
Kconfig efi/loongarch: Add efistub booting support 2022-09-06 11:19:34 +02:00
Kconfig.debug LoongArch: Add prologue unwinder support 2022-08-12 13:10:11 +08:00
Makefile efi/loongarch: Add efistub booting support 2022-09-06 11:19:34 +02:00