From: Will Deacon Date: Mon, 29 Jan 2018 11:59:58 +0000 (+0000) Subject: arm64: entry: Reword comment about post_ttbr_update_workaround X-Git-Tag: v4.14.20~142 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8703f27d7c5db70ffd793a813160f28e810cc1bc;p=platform%2Fkernel%2Flinux-rpi.git arm64: entry: Reword comment about post_ttbr_update_workaround Commit f167211a93ac upstream. We don't fully understand the Cavium ThunderX erratum, but it appears that mapping the kernel as nG can lead to horrible consequences such as attempting to execute userspace from kernel context. Since kpti isn't enabled for these CPUs anyway, simplify the comment justifying the lack of post_ttbr_update_workaround in the exception trampoline. Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas Signed-off-by: Ard Biesheuvel Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index 8d7112a..9766039 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -962,16 +962,9 @@ alternative_else_nop_endif orr \tmp, \tmp, #USER_ASID_FLAG msr ttbr1_el1, \tmp /* - * We avoid running the post_ttbr_update_workaround here because the - * user and kernel ASIDs don't have conflicting mappings, so any - * "blessing" as described in: - * - * http://lkml.kernel.org/r/56BB848A.6060603@caviumnetworks.com - * - * will not hurt correctness. Whilst this may partially defeat the - * point of using split ASIDs in the first place, it avoids - * the hit of invalidating the entire I-cache on every return to - * userspace. + * We avoid running the post_ttbr_update_workaround here because + * it's only needed by Cavium ThunderX, which requires KPTI to be + * disabled. */ .endm