Skip to content

efi: Enable BTI for EFI runtimes services

Ard Biesheuvel linux-arm-kernel linux-efi 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 18 repliesIn review
  2. v12 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- enable BTI in UEFI code regions even if CONFIG_ARM64_BIT_KERNEL=n
- deal with BTI exceptions occuring in EFI code gracefully
- add equivalent handling to x86
- add Kees's R-b

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3efi: Discover BTI support in runtime services regionsarch/arm/include/asm/efi.h arch/arm/kernel/efi.c arch/arm64/include/asm/efi.h +6 more+25 -110 replies
2/3efi: arm64: Wire up BTI annotation in memory attributes tablearch/arm64/kernel/efi.c arch/arm64/kernel/traps.c+18 -29 replies
3/3efi: x86: Wire up IBT annotation in memory attributes tablearch/x86/include/asm/efi.h arch/x86/include/asm/ibt.h arch/x86/kernel/apm_32.c +2 more+15 -78 replies

Reviews trailers per patch

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

PatchKees CookDave HansenPeter Zijlstra (Intel)Mark RutlandWill Deacon
1/3R-b
2/3R-b A-b R-b
3/3A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/3] efi: Enable BTI for EFI runtimes services

The EFI spec v2.10 introduces a global flag in the memory attributes table that indicates whether the EFI runtime code regions were emitted with BTI landing pads, and can therefore tolerate being mapped with BTI enforcement enabled.

Add the generic plumbing for this, and wire it up for arm64.

Changes since v1:
- enable BTI in UEFI code regions even if CONFIG_ARM64_BIT_KERNEL=n
- deal with BTI exceptions occuring in EFI code gracefully
- add equivalent handling to x86
- add Kees's R-b

Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
Cc Kees Cook <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Dave Hansen <[email protected]>

Ard Biesheuvel (3):
efi: Discover BTI support in runtime services regions
efi: arm64: Wire up BTI annotation in memory attributes table
efi: x86: Wire up IBT annotation in memory attributes table

 arch/arm/include/asm/efi.h     |  2 +-
 arch/arm/kernel/efi.c          |  5 +++--
 arch/arm64/include/asm/efi.h   |  3 ++-
 arch/arm64/kernel/efi.c        | 17 ++++++++++++++---
 arch/arm64/kernel/traps.c      |  6 ++++++
 arch/riscv/include/asm/efi.h   |  2 +-
 arch/riscv/kernel/efi.c        |  3 ++-
 arch/x86/include/asm/efi.h     |  4 +++-
 arch/x86/include/asm/ibt.h     |  4 ++--
 arch/x86/kernel/apm_32.c       |  4 ++--
 arch/x86/kernel/cpu/common.c   |  5 +++--
 arch/x86/platform/efi/efi_64.c |  8 +++++++-
 drivers/firmware/efi/memattr.c |  7 ++++++-
 include/linux/efi.h            |  8 ++++++--
 14 files changed, 58 insertions(+), 20 deletions(-)
Signature · 1 line
2.39.1