OSDN Git Service

arm64: Add skeleton to harden the branch predictor against aliasing attacks
authorWill Deacon <will.deacon@arm.com>
Wed, 3 Jan 2018 11:17:58 +0000 (11:17 +0000)
committerSrinivas Ramana <sramana@codeaurora.org>
Wed, 7 Feb 2018 12:03:15 +0000 (17:33 +0530)
commit4e56397ea6a4597cf7692b65a18179d1a9bbae2a
tree3d3415f8276523f1bc23a71663f10d019e52b7c5
parent24c543be8577aa9d425e0867be32355dfcb5b831
arm64: Add skeleton to harden the branch predictor against aliasing attacks

Aliasing attacks against CPU branch predictors can allow the attacks to
redirect speculative control flow on some CPUs and potentially divulge
information from one context to another.

This patch adds initial skeleton code behind a new Kconfig option to
enable implementation-specific mitigations against these attacks for
CPUs that are affected.

Change-Id: I07fba1943dd63df8951bf68fac947666100e5559
Co-developed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Git-commit: 0f15adbb2861ce6f75ccfc5a92b19eae0ef327d0
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[sramana@codeaurora.org: Fix merge conflicts and make it
compilable on msm-4.4]
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
arch/arm64/Kconfig
arch/arm64/include/asm/cpufeature.h
arch/arm64/include/asm/mmu.h
arch/arm64/include/asm/sysreg.h
arch/arm64/kernel/Makefile
arch/arm64/kernel/bpi.S [new file with mode: 0644]
arch/arm64/kernel/cpu_errata.c
arch/arm64/kernel/cpufeature.c
arch/arm64/kernel/entry.S
arch/arm64/mm/context.c
arch/arm64/mm/fault.c