Skip to content
Unverified Commit d41373a4 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by Palmer Dabbelt
Browse files

riscv: efi: Set NX compat flag in PE/COFF header



The IMAGE_DLLCHARACTERISTICS_NX_COMPAT informs the firmware that the
EFI binary does not rely on pages that are both executable and
writable.

The flag is used by some distro versions of GRUB to decide if the EFI
binary may be executed.

As the Linux kernel neither has RWX sections nor needs RWX pages for
relocation we should set the flag.

Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: default avatarEmil Renner Berthing <emil.renner.berthing@canonical.com>
Fixes: cb7d2dd5 ("RISC-V: Add PE/COFF header for EFI stub")
Acked-by: default avatarArd Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20240929140233.211800-1-heinrich.schuchardt@canonical.com


Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent 33549fcf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment