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)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 8 Jan 2018 18:45:25 +0000 (18:45 +0000)
commit0f15adbb2861ce6f75ccfc5a92b19eae0ef327d0
tree918eadd8cc51a5c04e2c9d4e657a4fec8f4b29d4
parent95e3de3590e3f2358bb13f013911bc1bfa5d3f53
arm64: Add skeleton to harden the branch predictor against aliasing attacks

Aliasing attacks against CPU branch predictors can allow an attacker 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.

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/Kconfig
arch/arm64/include/asm/cpucaps.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