diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2018-05-29 13:11:13 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2018-05-31 17:35:32 +0100 |
commit | 9dd9614f5476687abbff8d4b12cd08ae70d7c2ad (patch) | |
tree | 0d4b34722a54c5dd0ea6f4c65346466d212cda56 /arch/arm64/kernel | |
parent | 647d0519b53f440a55df163de21c52a8205431cc (diff) | |
download | blackbird-op-linux-9dd9614f5476687abbff8d4b12cd08ae70d7c2ad.tar.gz blackbird-op-linux-9dd9614f5476687abbff8d4b12cd08ae70d7c2ad.zip |
arm64: ssbd: Introduce thread flag to control userspace mitigation
In order to allow userspace to be mitigated on demand, let's
introduce a new thread flag that prevents the mitigation from
being turned off when exiting to userspace, and doesn't turn
it on on entry into the kernel (with the assumption that the
mitigation is always enabled in the kernel itself).
This will be used by a prctl interface introduced in a later
patch.
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r-- | arch/arm64/kernel/entry.S | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index e6f6e2339b22..28ad8799406f 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -147,6 +147,8 @@ alternative_cb arm64_enable_wa2_handling alternative_cb_end ldr_this_cpu \tmp2, arm64_ssbd_callback_required, \tmp1 cbz \tmp2, \targ + ldr \tmp2, [tsk, #TSK_TI_FLAGS] + tbnz \tmp2, #TIF_SSBD, \targ mov w0, #ARM_SMCCC_ARCH_WORKAROUND_2 mov w1, #\state alternative_cb arm64_update_smccc_conduit |