From: Ard Biesheuvel Date: Fri, 23 Feb 2018 18:29:02 +0000 (+0000) Subject: arm64: mm: don't write garbage into TTBR1_EL1 register X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=35d75b7bfc67520fb1d93b63ab3ae27992006f66;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git arm64: mm: don't write garbage into TTBR1_EL1 register Stable backport commit 173358a49173 ("arm64: kpti: Add ->enable callback to remap swapper using nG mappings") of upstream commit f992b4dfd58b did not survive the backporting process unscathed, and ends up writing garbage into the TTBR1_EL1 register, rather than pointing it to the zero page to disable translations. Fix that. Cc: #v4.14 Reported-by: Nicolas Dechesne Signed-off-by: Ard Biesheuvel Acked-by: Will Deacon Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S index 329a1c43365e..139320a7f7a2 100644 --- a/arch/arm64/mm/proc.S +++ b/arch/arm64/mm/proc.S @@ -155,7 +155,7 @@ ENDPROC(cpu_do_switch_mm) .macro __idmap_cpu_set_reserved_ttbr1, tmp1, tmp2 adrp \tmp1, empty_zero_page - msr ttbr1_el1, \tmp2 + msr ttbr1_el1, \tmp1 isb tlbi vmalle1 dsb nsh