]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
arm64: cpufeature: Detect SSBS and advertise to userspace
authorWill Deacon <will.deacon@arm.com>
Thu, 24 Oct 2019 12:48:17 +0000 (14:48 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Nov 2019 18:04:48 +0000 (19:04 +0100)
commit2a3135c3033cd80a543d651f902fb7d4ebf0610c
treeca510f8d12b0a54717f2652361fc0d6fd75f4743
parent78dc3acb34fab32fb01c270e64f006b2353504c9
arm64: cpufeature: Detect SSBS and advertise to userspace

BugLink: https://bugs.launchpad.net/bugs/1851876
[ Upstream commit d71be2b6c0e19180b5f80a6d42039cc074a693a2 ]

Armv8.5 introduces a new PSTATE bit known as Speculative Store Bypass
Safe (SSBS) which can be used as a mitigation against Spectre variant 4.

Additionally, a CPU may provide instructions to manipulate PSTATE.SSBS
directly, so that userspace can toggle the SSBS control without trapping
to the kernel.

This patch probes for the existence of SSBS and advertise the new instructions
to userspace if they exist.

Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/arm64/include/asm/cpucaps.h
arch/arm64/include/asm/sysreg.h
arch/arm64/include/uapi/asm/hwcap.h
arch/arm64/kernel/cpufeature.c
arch/arm64/kernel/cpuinfo.c