Skip to content

arm64: Expose kernel code size to EFI zboot code

Ard Biesheuvel linux-arm-kernel linux-efi 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2efi/zboot: arm64: Inject kernel code size symbol into the zboot payloadarch/arm64/boot/Makefile arch/arm64/kernel/image-vars.h drivers/firmware/efi/libstub/Makefile.zboot +1 more+15 -11 reply
2/2efi/zboot: arm64: Grab kernel code size from zboot payloaddrivers/firmware/efi/libstub/Makefile.zboot drivers/firmware/efi/libstub/arm64.c drivers/firmware/efi/libstub/efistub.h +1 more+21 -302 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMark Rutland
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] arm64: Expose kernel code size to EFI zboot code

The EFI zboot code needs access to the kernel code size, in order to be able to determine which part of the image needs to be cleaned to the PoU, and does not tolerate being mapped with non-executable permissions.

Instead of adding [0] this to the kernel image header, which makes it ABI, let's use Kbuild rules to inject this quantity into the zboot payload ELF object.

[0] https://lore.kernel.org/all/[email protected]/

Ard Biesheuvel (2):
efi/zboot: arm64: Inject kernel code size symbol into the zboot
payload
efi/zboot: arm64: Grab kernel code size from zboot payload

 arch/arm64/boot/Makefile                    |  3 +++
 arch/arm64/kernel/image-vars.h              |  4 ++++
 drivers/firmware/efi/libstub/Makefile.zboot | 16 ++++------------
 drivers/firmware/efi/libstub/arm64.c        | 19 +++++++++++++------
 drivers/firmware/efi/libstub/efistub.h      |  3 +--
 drivers/firmware/efi/libstub/zboot.c        | 15 ++++-----------
 drivers/firmware/efi/libstub/zboot.lds      |  7 +++++++
 7 files changed, 36 insertions(+), 31 deletions(-)
Signature · 1 line
2.39.2