Skip to content

arm64/efi/zboot: Clean up and enable BTI annotation

Ard Biesheuvel linux-arm-kernel linux-efi 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 0 repliesNew
  2. v16 patches 1 replySuperseded

Changes in v2 from the cover letter

- 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.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6efi/pe: Import new BTI/IBT header flags from the specinclude/linux/pe.h+4 -00 replies
2/6arm64: efi: Enable BTI codegen and add PE/COFF annotationarch/arm64/kernel/efi-header.S drivers/firmware/efi/libstub/Makefile+44 -300 replies
3/6efi/zboot: arm64: Poke kernel code size into the zboot payload image headerarch/arm64/boot/Makefile arch/arm64/kernel/image-vars.h+26 -10 replies
4/6efi/zboot: Add BSS padding before compressiondrivers/firmware/efi/libstub/Makefile.zboot drivers/firmware/efi/libstub/zboot-header.S drivers/firmware/efi/libstub/zboot.c+31 -130 replies
5/6efi/zboot: Set forward edge CFI compat header flag if supportedarch/arm64/boot/Makefile drivers/firmware/efi/libstub/Makefile.zboot drivers/firmware/efi/libstub/zboot-header.S+40 -190 replies
6/6efi/zboot: arm64: Grab code size from image headerdrivers/firmware/efi/libstub/Makefile.zboot drivers/firmware/efi/libstub/arm64.c drivers/firmware/efi/libstub/efistub.h +1 more+28 -300 replies

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchMark Brown
1/6
2/6R-b
3/6
4/6
5/6
6/6

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

Read the v2 thread

Cover letter [PATCH v2 0/6] arm64/efi/zboot: Clean up and enable BTI annotation

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(-)
Signature · 1 line
2.39.2