]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: spectre-v2: harden branch predictor on context switches
authorRussell King <rmk+kernel@armlinux.org.uk>
Fri, 20 Apr 2018 09:06:27 +0000 (10:06 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Thu, 31 May 2018 09:39:55 +0000 (10:39 +0100)
commit6ab6f890ed4cca44a2c8f6f76b5bdbb8b90fea8e
tree38e2ae7fcf3b0413a87f8e4126688cbf49fd008e
parent56832ae85996af33d56621319669e128e6066621
ARM: spectre-v2: harden branch predictor on context switches

Harden the branch predictor against Spectre v2 attacks on context
switches for ARMv7 and later CPUs.  We do this by:

Cortex A9, A12, A17, A73, A75: invalidating the BTB.
Cortex A15, Brahma B15: invalidating the instruction cache.

Cortex A57 and Cortex A72 are not addressed in this patch.

Cortex R7 and Cortex R8 are also not addressed as we do not enforce
memory protection on these cores.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Boot-tested-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm/mm/Kconfig
arch/arm/mm/proc-v7-2level.S
arch/arm/mm/proc-v7.S