OSDN Git Service

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)
committerGerrit - the friendly Code Review server <code-review@localhost>
Wed, 7 Feb 2018 12:16:43 +0000 (04:16 -0800)
commitac2491ab101ce4b5574809bebdba98a23b6c2ed6
treeebb16ec55271acce525d503948a41a200e10dad5
parenta2c10034c924ace0dfec1edbf9f35c2edc926f66
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.

Change-Id: I554536e8e5cb3839e102299da8f5b944415b1880
Co-developed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Git-commit: aa6acde65e03186b5add8151e1ffe36c3c62639b
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
arch/arm64/kernel/bpi.S
arch/arm64/kernel/cpu_errata.c