arm64: Implement branch predictor hardening for affected Cortex-A CPUs
authorWill Deacon <will.deacon@arm.com>
Wed, 3 Jan 2018 12:46:21 +0000 (12:46 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 8 Jan 2018 18:47:05 +0000 (18:47 +0000)
commitaa6acde65e03186b5add8151e1ffe36c3c62639b
tree450d9b380f76a8f33afb5a07dffe3229f6aa4d48
parenta65d219fe5dc7887fd5ca04c2ac3e9a34feb8dfc
arm64: Implement branch predictor hardening for affected Cortex-A CPUs

Cortex-A57, A72, A73 and A75 are susceptible to branch predictor aliasing
and can theoretically be attacked by malicious code.

This patch implements a PSCI-based mitigation for these CPUs when available.
The call into firmware will invalidate the branch predictor state, preventing
any malicious entries from affecting other victim contexts.

Co-developed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/bpi.S
arch/arm64/kernel/cpu_errata.c