linux/arch/arm64
Ard Biesheuvel e0169d62ef arm64: efi: Set NX compat flag in PE/COFF header
[ Upstream commit 3c66bb1918 ]

The PE/COFF header has a NX compat flag which informs the firmware that
the application does not rely on memory regions being mapped with both
executable and writable permissions at the same time.

This is typically used by the firmware to decide whether it can set the
NX attribute on all allocations it returns, but going forward, it may be
used to enforce a policy that only permits applications with the NX flag
set to be loaded to begin wiht in some configurations, e.g., when Secure
Boot is in effect.

Even though the arm64 version of the EFI stub may relocate the kernel
before executing it, it always did so after disabling the MMU, and so we
were always in line with what the NX compat flag conveys, we just never
bothered to set it.

So let's set the flag now.

Cc: <stable@vger.kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-06 12:10:37 +02:00
..
boot arm64: dts: qcom: sm8150: Fix the iommu mask used for PCIe controllers 2023-03-30 12:49:29 +02:00
configs This update includes the following changes: 2022-10-10 13:04:25 -07:00
crypto crypto: arm64/sm3 - fix possible crash with CFI enabled 2022-12-31 13:32:34 +01:00
hyperv hyperv: simplify and rename generate_guest_id 2022-09-28 13:36:56 +00:00
include arm64: mte: Fix/clarify the PG_mte_tagged semantics 2023-03-11 13:55:44 +01:00
kernel arm64: efi: Set NX compat flag in PE/COFF header 2023-04-06 12:10:37 +02:00
kvm arm64: mte: Fix/clarify the PG_mte_tagged semantics 2023-03-11 13:55:44 +01:00
lib
mm arm64: Reset KASAN tag in copy_highpage with HW tags only 2023-03-11 13:55:44 +01:00
net
tools arm64/sysreg: Fix typo in SCTR_EL1.SPINTMASK 2022-10-07 14:30:11 +01:00
xen
Kbuild
Kconfig arm64: mm: hugetlb: Disable HUGETLB_PAGE_OPTIMIZE_VMEMMAP 2023-03-10 09:34:24 +01:00
Kconfig.debug
Kconfig.platforms ARM: SoC code changes for 6.1 2022-10-06 11:22:25 -07:00
Makefile Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00