]> git.itanic.dy.fi Git - linux-stable/commit
arm64: proton-pack: Include unprivileged eBPF status in Spectre v2 mitigation reporting
authorJames Morse <james.morse@arm.com>
Thu, 3 Mar 2022 16:53:56 +0000 (16:53 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Mar 2022 11:11:53 +0000 (12:11 +0100)
commitb65b87e718c33caa46d5246d8fbeda895aa9cf5b
tree6b90f6a5c5082261f8f8aaf2cb0932ed214d6424
parent551717cf3b58f11311d10f70eb027d4b275135de
arm64: proton-pack: Include unprivileged eBPF status in Spectre v2 mitigation reporting

commit 58c9a5060cb7cd529d49c93954cdafe81c1d642a upstream.

The mitigations for Spectre-BHB are only applied when an exception is
taken from user-space. The mitigation status is reported via the spectre_v2
sysfs vulnerabilities file.

When unprivileged eBPF is enabled the mitigation in the exception vectors
can be avoided by an eBPF program.

When unprivileged eBPF is enabled, print a warning and report vulnerable
via the sysfs vulnerabilities file.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/proton-pack.c