]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmVirtPkg: make EFI_LOADER_DATA non-executable
authorArd Biesheuvel <ardb@kernel.org>
Tue, 2 Aug 2022 09:48:04 +0000 (11:48 +0200)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 26 Oct 2022 17:28:39 +0000 (17:28 +0000)
When the memory protections were implemented and enabled on ArmVirtQemu
5+ years ago, we had to work around the fact that GRUB at the time
expected EFI_LOADER_DATA to be executable, as that is the memory type it
allocates when loading its modules.

This has been fixed in GRUB in August 2017, so by now, we should be able
to tighten this, and remove execute permissions from EFI_LOADER_DATA
allocations.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
ArmVirtPkg/ArmVirt.dsc.inc

index 34575585adbb79ee125869b15da988b9031756ab..462073517a22b00829d05076089e8b645b60983e 100644 (file)
   # reserved ones, with the exception of LoaderData regions, of which OS loaders\r
   # (i.e., GRUB) may assume that its contents are executable.\r
   #\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xC000000000007FD1\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xC000000000007FD5\r
 \r
 [Components.common]\r
   #\r