arm64: mm: ensure that the zero page is visible to the page table walker
authorWill Deacon <will.deacon@arm.com>
Thu, 10 Dec 2015 16:05:36 +0000 (16:05 +0000)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:11:17 +0000 (13:11 +0000)
commitf713651e314dd2b531030858fabeddd4d403269a
tree3fbc62ec34d9ceb7903d3ed4478ba33df7824526
parent24920856b054e0bb5908e59df1e85af2f64b1066
arm64: mm: ensure that the zero page is visible to the page table walker

commit 32d6397805d00573ce1fa55f408ce2bca15b0ad3 upstream.

In paging_init, we allocate the zero page, memset it to zero and then
point TTBR0 to it in order to avoid speculative fetches through the
identity mapping.

In order to guarantee that the freshly zeroed page is indeed visible to
the page table walker, we need to execute a dsb instruction prior to
writing the TTBR.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/mm/mmu.c