]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitce2920895c1f13a9436c214b5da4ed5a1266196d
tree5012c64db317e922cd1c6eaa26f481d9e8f2c479
parente6ef8fae1811538e9bd9ef19702f2e1468ef8920
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