linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] arm64/efi/zboot: Clean up and enable BTI annotation
@ 2023-04-18 13:49 Ard Biesheuvel
  2023-04-18 13:49 ` [PATCH v2 1/6] efi/pe: Import new BTI/IBT header flags from the spec Ard Biesheuvel
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Ard Biesheuvel @ 2023-04-18 13:49 UTC (permalink / raw)
  To: linux-efi
  Cc: linux-arm-kernel, mark.rutland, broonie, will, catalin.marinas,
	Ard Biesheuvel

Some tweaks for the arm64 EFI header and the zboot version, to add the
annotation that informs the loader that the code regions may be mapped
with BTI enforcement enabled.

As a related cleanup, add the combined codesize (text+rodata+inittext)
to the arm64 Image header, so the EFI zboot loader can grab it from the
image after decompressing it.

Changes since v1:
- instead of adding a proper header field, only pass the code size via
  the image header when generating the zboot image, using the
  text_offset field which still has meaning in the bare metal ABI (which
  means bare metal loaders must honour it) but is actually no longer in
  use.

Ard Biesheuvel (6):
  efi/pe: Import new BTI/IBT header flags from the spec
  arm64: efi: Enable BTI codegen and add PE/COFF annotation
  efi/zboot: arm64: Poke kernel code size into the zboot payload image
    header
  efi/zboot: Add BSS padding before compression
  efi/zboot: Set forward edge CFI compat header flag if supported
  efi/zboot: arm64: Grab code size from image header

 arch/arm64/boot/Makefile                    | 24 ++++++-
 arch/arm64/kernel/efi-header.S              | 71 ++++++++++++--------
 arch/arm64/kernel/image-vars.h              |  4 ++
 drivers/firmware/efi/libstub/Makefile       |  3 +-
 drivers/firmware/efi/libstub/Makefile.zboot | 41 +++++++----
 drivers/firmware/efi/libstub/arm64.c        | 26 +++++--
 drivers/firmware/efi/libstub/efistub.h      |  3 +-
 drivers/firmware/efi/libstub/zboot-header.S | 51 +++++++++-----
 drivers/firmware/efi/libstub/zboot.c        | 13 +---
 include/linux/pe.h                          |  4 ++
 10 files changed, 160 insertions(+), 80 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] 7+ messages in thread

end of thread, other threads:[~2023-04-18 13:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-18 13:49 [PATCH v2 0/6] arm64/efi/zboot: Clean up and enable BTI annotation Ard Biesheuvel
2023-04-18 13:49 ` [PATCH v2 1/6] efi/pe: Import new BTI/IBT header flags from the spec Ard Biesheuvel
2023-04-18 13:49 ` [PATCH v2 2/6] arm64: efi: Enable BTI codegen and add PE/COFF annotation Ard Biesheuvel
2023-04-18 13:49 ` [PATCH v2 3/6] efi/zboot: arm64: Poke kernel code size into the zboot payload image header Ard Biesheuvel
2023-04-18 13:49 ` [PATCH v2 4/6] efi/zboot: Add BSS padding before compression Ard Biesheuvel
2023-04-18 13:49 ` [PATCH v2 5/6] efi/zboot: Set forward edge CFI compat header flag if supported Ard Biesheuvel
2023-04-18 13:49 ` [PATCH v2 6/6] efi/zboot: arm64: Grab code size from image header Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).