Skip to content

efi: arm64: Set NX compat flag where appropriate

Ard Biesheuvel linux-arm-kernel linux-efi stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3efi/libstub: zboot: Mark zboot EFI application as NX compatibledrivers/firmware/efi/libstub/zboot-header.S+1 -10 replies
2/3efi/libstub: arm64: Remap relocated image with strict permissionsdrivers/firmware/efi/libstub/arm64-stub.c+1 -00 replies
3/3arm64: efi: Set NX compat flag in PE/COFF headerarch/arm64/kernel/efi-header.S+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] efi: arm64: Set NX compat flag where appropriate

PE/COFF images that can tolerate running under a strict W^X policy when it comes to firmware provided allocations should indicate so, by setting the associated bit in the PE/COFF header.

Today, this makes little difference, but going forward, restricted policies regarding secure boot and measured boot (e.g., MS Secured-core) may refuse to run such images altogether.

Given that the zboot and arm64 EFI stub implementations do not rely on firmware provided mappings being writable and executable at the same time, let's set this bit.

Note that a change landed in v6.3 where we no longer tolerate this unless we remap the relocated kernel code read-only/executable explicitly (patch #2)

Cc Peter Jones <[email protected]>
Cc Gerd Hoffmann <[email protected]>
Cc Ilias Apalodimas <[email protected]>
Cc Kees Cook <[email protected]>

Ard Biesheuvel (3):
efi/libstub: zboot: Mark zboot EFI application as NX compatible efi/libstub: arm64: Remap relocated image with strict permissions
arm64: efi: Set NX compat flag in PE/COFF header

 arch/arm64/kernel/efi-header.S              | 2 +-
 drivers/firmware/efi/libstub/arm64-stub.c   | 1 +
 drivers/firmware/efi/libstub/zboot-header.S | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)
Signature · 1 line
2.39.2