public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: Expose kernel code size to EFI zboot code
@ 2023-04-26 14:11 Ard Biesheuvel
  2023-04-26 14:11 ` [PATCH 1/2] efi/zboot: arm64: Inject kernel code size symbol into the zboot payload Ard Biesheuvel
  2023-04-26 14:11 ` [PATCH 2/2] efi/zboot: arm64: Grab kernel code size from " Ard Biesheuvel
  0 siblings, 2 replies; 6+ messages in thread
From: Ard Biesheuvel @ 2023-04-26 14:11 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-efi, mark.rutland, catalin.marinas, will, Ard Biesheuvel

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/20230418134952.1170141-1-ardb@kernel.org/

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(-)

-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-04-26 15:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-26 14:11 [PATCH 0/2] arm64: Expose kernel code size to EFI zboot code Ard Biesheuvel
2023-04-26 14:11 ` [PATCH 1/2] efi/zboot: arm64: Inject kernel code size symbol into the zboot payload Ard Biesheuvel
2023-04-26 15:58   ` Mark Rutland
2023-04-26 14:11 ` [PATCH 2/2] efi/zboot: arm64: Grab kernel code size from " Ard Biesheuvel
2023-04-26 14:20   ` Ard Biesheuvel
2023-04-26 15:57     ` Mark Rutland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox