This is a followup to the 2-patch series I sent out earlier today.

This series fixes some issues that exist in the code with regard to how device
mappings are created. According to the architecture, read-sensitive devices
should be mapped with the non-execute bits (XN/PXN/UXN) to prevent speculative
instruction fetches from accessing those regions.

Patch #1 removes GcdAttributeToArmAttribute() rather than fixing it, since it
is unused anyway. Note that it fails to set shareability attributes on cached
mappings as well, so it is broken in more than one way. (identical to v1)

Patch #2 ensures that the ArmVirtQemu firmware is still executable in place
after changing the device mapping attribute set to include the non-exec
attributes. (new in v2)

Patch #3 does the same for FVP-AArch64 and RTSM-A15_MPCore. (new in v2)

Patch #4 makes the changes to ensure that all device mappings have the XN bit
set. The v2 version now covers ARM as well.

Ard Biesheuvel (4):
  ArmPkg/AArch64Mmu: remove unused GcdAttributeToArmAttribute()
  ArmVirtPkg/ArmVirtPlatformLib: do not map executable NOR region as
    device
  ArmVExpressPkg/ArmVExpressLibRTSM: map NOR flash as cached
  ArmPkg/Mmu: set required XN attributes for device mappings

 ArmPkg/Include/Chipset/AArch64.h                                   |  5 --
 ArmPkg/Include/Chipset/ArmV7Mmu.h                                  |  2 +
 ArmPkg/Library/ArmLib/AArch64/AArch64Mmu.c                         | 47 
++--------------
 ArmPkg/Library/ArmLib/ArmV7/ArmV7Mmu.c                             |  2 +-
 ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSMMem.c |  2 +-
 ArmVirtPkg/Library/ArmVirtPlatformLib/VirtMem.c                    | 58 
++++++++++++++++----
 6 files changed, 55 insertions(+), 61 deletions(-)

-- 
1.9.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to