| From foo@baz Thu Apr 5 21:39:28 CEST 2018 |
| From: Mark Rutland <mark.rutland@arm.com> |
| Date: Tue, 3 Apr 2018 12:09:22 +0100 |
| Subject: arm64: entry: Reword comment about post_ttbr_update_workaround |
| To: stable@vger.kernel.org |
| Cc: mark.brown@linaro.org, ard.biesheuvel@linaro.org, marc.zyngier@arm.com, will.deacon@arm.com |
| Message-ID: <20180403110923.43575-27-mark.rutland@arm.com> |
| |
| From: Will Deacon <will.deacon@arm.com> |
| |
| 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 <will.deacon@arm.com> |
| Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> |
| Signed-off-by: Alex Shi <alex.shi@linaro.org> [v4.9 backport] |
| Signed-off-by: Mark Rutland <mark.rutland@arm.com> [v4.9 backport] |
| Tested-by: Will Deacon <will.deacon@arm.com> |
| Tested-by: Greg Hackmann <ghackmann@google.com> |
| Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| --- |
| arch/arm64/kernel/entry.S | 13 +++---------- |
| 1 file changed, 3 insertions(+), 10 deletions(-) |
| |
| --- a/arch/arm64/kernel/entry.S |
| +++ b/arch/arm64/kernel/entry.S |
| @@ -861,16 +861,9 @@ __ni_sys_trace: |
| 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 |
| |