On Thu, 08 Oct, at 08:02:04PM, Ard Biesheuvel wrote: > 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@xxxxxxxxxx> > --- > arch/arm64/kernel/Makefile | 12 ++++- > arch/arm64/kernel/efi-entry.S | 10 ++-- > arch/arm64/kernel/head.S | 14 ++--- > arch/arm64/kernel/image.h | 27 ++++++++++ > drivers/firmware/efi/libstub/Makefile | 39 +++++++++++--- > drivers/firmware/efi/libstub/string.c | 57 ++++++++++++++++++++ > 6 files changed, 139 insertions(+), 20 deletions(-) Reviewed-by: Matt Fleming <matt.fleming@xxxxxxxxx> -- Matt Fleming, Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html