]> git.baikalelectronics.ru Git - kernel.git/commit
arm64/efi: isolate EFI stub from the kernel proper
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 8 Oct 2015 19:02:04 +0000 (20:02 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 12 Oct 2015 15:20:12 +0000 (16:20 +0100)
commita89e9832592938405fb99cc9d668970925971fac
tree111ad1d750410588ecd346fc257c05565963f0fd
parent7d804b592de893149098dd6e1fee5ef7f5873779
arm64/efi: isolate EFI stub from the kernel proper

Since arm64 does not use a builtin decompressor, the EFI stub is built
into the kernel proper. So far, this has been working fine, but actually,
since the stub is in fact a PE/COFF relocatable binary that is executed
at an unknown offset in the 1:1 mapping provided by the UEFI firmware, we
should not be seamlessly sharing code with the kernel proper, which is a
position dependent executable linked at a high virtual offset.

So instead, separate the contents of libstub and its dependencies, by
putting them into their own namespace by prefixing all of its symbols
with __efistub. This way, we have tight control over what parts of the
kernel proper are referenced by the stub.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/Makefile
arch/arm64/kernel/efi-entry.S
arch/arm64/kernel/head.S
arch/arm64/kernel/image.h
drivers/firmware/efi/libstub/Makefile
drivers/firmware/efi/libstub/string.c [new file with mode: 0644]