ARM: include unprivileged BPF status in Spectre V2 reporting
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Mon, 7 Mar 2022 19:28:32 +0000 (19:28 +0000)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 8 Mar 2022 14:46:08 +0000 (14:46 +0000)
commit25875aa71dfefd1959f07e626c4d285b88b27ac2
tree85333d5e2e4f143773dc9e455c156a8ad73c3afa
parentb9baf5c8c5c356757f4f9d8180b5e9d234065bc3
ARM: include unprivileged BPF status in Spectre V2 reporting

The mitigations for Spectre-BHB are only applied when an exception
is taken, but when unprivileged BPF is enabled, userspace can
load BPF programs that can be used to exploit the problem.

When unprivileged BPF is enabled, report the vulnerable status via
the spectre_v2 sysfs file.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
arch/arm/kernel/spectre.c