Subject: [PATCH 0/4] arm64: head: pad Image header to 64 KB and unmap it

From: Ard Biesheuvel <[email-masked]>
Date: Tue, 27 Oct 2020 08:32:05 +0100

The EFI header definition was updated recently to increase the section
alignment to 64 KB, which causes the EFI loader to put the kernel Image
at an offset that is guaranteed to be compatible with the kernel's image
placement policy when CONFIG_RELOCATABLE=y, removing the need to move it
around in DRAM before boot.

This change failed to take into account that the first section in the
PE/COFF description should start at a 64 KB aligned boundary as well,
and so even though EFI loaders don't seem to care, the current PE/COFF
layout is not 100% compliant.

So let's fix this by padding the size of the .head region to 64 KB,
and while at it, removing it from the kernel's executable mapping, which
is now guaranteed to be possible regardless of the page size the kernel
is running with. And if we don't map it, we don't need to reserve it
either.

Ard Biesheuvel (4):
  arm64: efi: increase EFI PE/COFF header padding to 64 KB
  arm64: omit [_text, _stext) from permanent kernel mapping
  arm64/head: avoid symbol names pointing into first 64 KB of kernel
    image
  arm64: head: tidy up the Image header definition

 arch/arm64/kernel/efi-header.S  | 86 ++++++++++++--------
 arch/arm64/kernel/head.S        | 19 +----
 arch/arm64/kernel/setup.c       |  4 +-
 arch/arm64/kernel/vmlinux.lds.S |  2 +-
 arch/arm64/mm/init.c            |  2 +-
 arch/arm64/mm/mmu.c             | 10 +--
 6 files changed, 61 insertions(+), 62 deletions(-)

-- 
2.17.1

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel