arm64: entry: Reword comment about post_ttbr_update_workaround

"Linux Kernel Mailing List" <[email protected]>
Newsgroups gmane.linux.kernel.commits.head
Message-ID <[email protected]>
Web:        https://git.kernel.org/torvalds/c/f167211a93ac41a65b7a0ab79d4479d0fb58c4f1
Commit:     f167211a93ac41a65b7a0ab79d4479d0fb58c4f1
Parent:     fa0465fc07c2f9f47bd1198ab368d341bd7c7e4e
Refname:    refs/heads/master
Author:     Will Deacon <[email protected]>
AuthorDate: Mon Jan 29 11:59:58 2018 +0000
Committer:  Catalin Marinas <[email protected]>
CommitDate: Tue Feb 6 22:53:23 2018 +0000

    arm64: entry: Reword comment about post_ttbr_update_workaround
    
    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 <[email protected]>
    Signed-off-by: Catalin Marinas <[email protected]>
---
 arch/arm64/kernel/entry.S | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
index b34e717d7597..9b8635d9d7ae 100644
--- a/arch/arm64/kernel/entry.S
+++ b/arch/arm64/kernel/entry.S
@@ -1013,16 +1013,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/[email protected]
-	 *
-	 * 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
 
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.