]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 23 Feb 2018 14:27:29 +0000 (08:27 -0600)
commit7ac5b9bf82e2c99e79daf5ba7a25470d57a03f34
tree6e6a3919a52f2c6f5ac3d3f7f05466171c3aa4e2
parent258711c57bc81962fd1548dc1bd1077572672d19
arm64: proc: Set PTE_NG for table entries to avoid traversing them twice

BugLink: http://bugs.launchpad.net/bugs/1751131
commit 2ce77f6d8a9ae9ce6d80397d88bdceb84a2004cd upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/arm64/mm/proc.S