audk/ArmPkg
Ard Biesheuvel 041c7a31c2 ArmPkg/ArmMmuLib ARM: Clear individual permission bits
Currently, the MMU code that is supposed to clear the RO or XP
attributes from a region just clears both unconditionally. This
approximates the desired behavior to some extent, but it does mean that
setting the RO bit first on a code region, and then clearing the XP bit
results both RO and XP being cleared, and we end up with writable code,
and avoiding that is the point of all these protections.

Once we introduce RP support, this will only get worse, so let's fix
this up, by reshuffling the attribute update code to take the entry mask
from the caller, and use the mask to preserve other attributes when
clearing RO or XP.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
2023-03-16 21:14:49 +00:00
..
Drivers ArmPkg/ArmMmuLib ARM: Isolate the access flag from AP mask 2023-03-16 21:14:49 +00:00
Filesystem/SemihostFs ArmPkg/SemihostFs: replace SetMem with ZeroMem 2023-03-09 09:45:39 +00:00
Include ArmPkg/ArmMmuLib ARM: Isolate the access flag from AP mask 2023-03-16 21:14:49 +00:00
Library ArmPkg/ArmMmuLib ARM: Clear individual permission bits 2023-03-16 21:14:49 +00:00
Universal/Smbios ArmPkg/SmbiosMiscDxe: Get SMBIOS information from OemMiscLib 2022-09-23 14:39:10 +00:00
ArmPkg.ci.yaml ArmPkg, ArmVirtPkg: put SpellCheck in AuditOnly mode 2022-09-10 08:23:27 +00:00
ArmPkg.dec ArmPkg/ArmMonitorLib: Definition for ArmMonitorLib library class 2022-11-06 16:32:28 +00:00
ArmPkg.dsc ArmPkg: Remove RealView Debugger support 2023-01-30 16:50:14 +00:00