arm64: Call ARCH_WORKAROUND_2 on transitions between EL0 and EL1
authorMarc Zyngier <marc.zyngier@arm.com>
Fri, 20 Jul 2018 09:53:00 +0000 (10:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 Jul 2018 12:28:50 +0000 (14:28 +0200)
commit5ad09d2abb5a0e4193b81c147efc828e13caf2ca
tree6a8146d4719d03199afc5d2cc5bbd410140dba99
parent1de2719134b5fe1156d04ef2a31a1b8b2307d3ba
arm64: Call ARCH_WORKAROUND_2 on transitions between EL0 and EL1

commit 8e2906245f1e3b0d027169d9f2e55ce0548cb96e upstream.

In order for the kernel to protect itself, let's call the SSBD mitigation
implemented by the higher exception level (either hypervisor or firmware)
on each transition between userspace and kernel.

We must take the PSCI conduit into account in order to target the
right exception level, hence the introduction of a runtime patching
callback.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Julien Grall <julien.grall@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>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/cpu_errata.c
arch/arm64/kernel/entry.S
include/linux/arm-smccc.h