summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2023-02-09 10:23:03 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-03-16 21:14:49 +0000
commit041c7a31c2213844a7a30dd57205bae2f754a5bb (patch)
tree8b04f3410fec3620effb9631b17a166f74ee0415 /ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
parent28dce5b130f75750bae4b5643dc57bea1aefd30c (diff)
downloadedk2-041c7a31c2213844a7a30dd57205bae2f754a5bb.tar.gz
edk2-041c7a31c2213844a7a30dd57205bae2f754a5bb.tar.bz2
edk2-041c7a31c2213844a7a30dd57205bae2f754a5bb.zip
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>
Diffstat (limited to 'ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c')
0 files changed, 0 insertions, 0 deletions