Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 6c6d6f42db3f5c3dc2b8d86ce32e1ce2c7fd85d1
      
https://github.com/tianocore/edk2/commit/6c6d6f42db3f5c3dc2b8d86ce32e1ce2c7fd85d1
  Author: Oliver Smith-Denny <o...@microsoft.com>
  Date:   2025-04-27 (Sun, 27 Apr 2025)

  Changed paths:
    M MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c

  Log Message:
  -----------
  MdeModulePkg: DxeCore: Lower Image Protection Print to Verbose Log Level

The print that describes memory attributes being applied to image
memory sections is currently at info level and very noisy, being
printed multiple times per image.

Reduce this to the verbose logging level.

Signed-off-by: Oliver Smith-Denny <o...@microsoft.com>


  Commit: 5ccb5fff02a66b21898bd57f48bbd7c3cd6f4e8d
      
https://github.com/tianocore/edk2/commit/5ccb5fff02a66b21898bd57f48bbd7c3cd6f4e8d
  Author: Oliver Smith-Denny <o...@microsoft.com>
  Date:   2025-04-27 (Sun, 27 Apr 2025)

  Changed paths:
    M MdeModulePkg/Core/Dxe/Gcd/Gcd.c
    M MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c

  Log Message:
  -----------
  MdeModulePkg: DxeCore: Set Image Protections Through GCD

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 <o...@microsoft.com>


Compare: https://github.com/tianocore/edk2/compare/856bdc8eec0f...5ccb5fff02a6

To unsubscribe from these emails, change your notification settings at 
https://github.com/tianocore/edk2/settings/notifications


_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to