summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/Metronome
diff options
context:
space:
mode:
authorOliver Smith-Denny <osde@microsoft.com>2025-04-15 15:07:51 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-04-27 05:52:11 +0000
commit5ccb5fff02a66b21898bd57f48bbd7c3cd6f4e8d (patch)
tree613e17f71da54b3358fc90ba75197a868bcd6649 /MdeModulePkg/Universal/Metronome
parent6c6d6f42db3f5c3dc2b8d86ce32e1ce2c7fd85d1 (diff)
downloadedk2-master.tar.gz
edk2-master.tar.bz2
edk2-master.zip
MdeModulePkg: DxeCore: Set Image Protections Through GCDHEADmaster
Today, SetUefiImageMemoryAttributes calls directly to the CPU Arch protocol to set EFI_MEMORY_XP or EFI_MEMORY_RO on image memory. However, this bypasses the GCD and so the GCD is out of sync with the actual state of memory. This can cause an issue in the scenario where a new attribute is being set (whether a virtual attribute or a real HW attribute), if the GCD attributes are queried for a region and the new attribute is appended to the existing GCD attributes (which are incorrect), then the incorrect attributes can get applied. This can result in setting EFI_MEMORY_XP on code sections of images and causing an execution fault. This patch updates SetUefiImageMemoryAttributes to call into the GCD to update the attributes there and let the GCD code call into the CPU Arch protocol to update the page table. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
Diffstat (limited to 'MdeModulePkg/Universal/Metronome')
0 files changed, 0 insertions, 0 deletions