]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - arch/arm64/mm/proc.S
arm64: proc: Set PTE_NG for table entries to avoid traversing them twice
authorWill Deacon <will.deacon@arm.com>
Tue, 13 Feb 2018 13:14:09 +0000 (13:14 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 14 Feb 2018 18:58:20 +0000 (18:58 +0000)
commit2ce77f6d8a9ae9ce6d80397d88bdceb84a2004cd
tree5012c64db317e922cd1c6eaa26f481d9e8f2c479
parent16e574d762ac5512eb922ac0ac5eed360b7db9d8
arm64: proc: Set PTE_NG for table entries to avoid traversing them twice

When KASAN is enabled, the swapper page table contains many identical
mappings of the zero page, which can lead to a stall during boot whilst
the G -> nG code continually walks the same page table entries looking
for global mappings.

This patch sets the nG bit (bit 11, which is IGNORED) in table entries
after processing the subtree so we can easily skip them if we see them
a second time.

Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/mm/proc.S