This series enables the non-exec DXE stack feature for AARCH64. It involves
some refactoring of ArmLib so we can reuse the bulk of the page table
manipulation code (patch #1). Then, it is simply a matter of calling the
newly introduced ArmSetMemoryRegionNoExec () [patch #2] on the stack region
right after it has been allocated (patch #3).
Patch #4 enables the feature for ArmVirtQemu if building for AARCH64.
Changes since v2:
- fixed some problems spotted by Heyi regarding the use of correct page table
attributes at EL2 or EL3
- fixed a code bug where the function was exited prematurely
- dropped a RETURN_STATUS to EFI_STATUS cast
- added Laszlo's R-b to patch #4
Ard Biesheuvel (4):
ArmPkg/AArch64Mmu: remove cache maintenance for page tables
ArmPkg/ArmLib MMU: add functions to set/clear RO and XN bits on
regions
MdeModulePkg/DxeIplPeim: implement non-exec stack for ARM/AARCH64
ArmVirtPkg/ArmVirtQemu: enable non-exec DXE stack for AARCH64
ArmPkg/Include/Library/ArmLib.h | 24 ++++++
ArmPkg/Library/ArmLib/AArch64/AArch64Mmu.c | 88 +++++++++++++++++++-
ArmPkg/Library/ArmLib/ArmV7/ArmV7Mmu.c | 36 ++++++++
ArmVirtPkg/ArmVirtQemu.dsc | 3 +
MdeModulePkg/Core/DxeIplPeim/Arm/DxeLoadFunc.c | 7 ++
MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 8 ++
6 files changed, 162 insertions(+), 4 deletions(-)
--
1.9.1
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel