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,#2). Then, it is simply a matter of calling the newly introduced ArmSetMemoryRegionNoExec () [patch #3] on the stack region right after it has been allocated (patch #4).
Patch #5 enables the feature for ArmVirtQemu if building for AARCH64. Changes since v2: - v2's 1/4 was actually quite but not entirely unrelated to this series, and was included in error instead of the 1/4 that I intended to send. - added a patch that cleans up the definitions of UXN vs XN - added some acks from Leif Changes since v1: - 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 (5): ArmPkg/AArch64Mmu: use architecturally correct definitions for XN/UXN ArmPkg/AArch64Mmu: move page table traversal code to separate function 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/Chipset/AArch64Mmu.h | 6 +- ArmPkg/Include/Library/ArmLib.h | 24 ++++ ArmPkg/Library/ArmLib/AArch64/AArch64Mmu.c | 143 +++++++++++++++++--- ArmPkg/Library/ArmLib/ArmV7/ArmV7Mmu.c | 36 +++++ ArmVirtPkg/ArmVirtQemu.dsc | 3 + MdeModulePkg/Core/DxeIplPeim/Arm/DxeLoadFunc.c | 7 + MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 8 ++ 7 files changed, 205 insertions(+), 22 deletions(-) -- 1.9.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel