Skip to content
Commit 2330b7ca authored by Jun Yao's avatar Jun Yao Committed by Catalin Marinas
Browse files

arm64/mm: use fixmap to modify swapper_pg_dir



Once swapper_pg_dir is in the rodata section, it will not be possible to
modify it directly, but we will need to modify it in some cases.

To enable this, we can use the fixmap when deliberately modifying
swapper_pg_dir. As the pgd is only transiently mapped, this provides
some resilience against illicit modification of the pgd, e.g. for
Kernel Space Mirror Attack (KSMA).

Signed-off-by: default avatarJun Yao <yaojun8558363@gmail.com>
Reviewed-by: default avatarJames Morse <james.morse@arm.com>
[Mark: simplify ifdeffery, commit message]
Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 2b5548b6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment