[PATCH 5/9] x86/speculation: Include unprivileged eBPF status in Spectre v2 mitigatio...
authorJosh Poimboeuf <jpoimboe@redhat.com>
Fri, 18 Feb 2022 19:49:08 +0000 (11:49 -0800)
committerSalvatore Bonaccorso <carnil@debian.org>
Mon, 7 Mar 2022 21:06:21 +0000 (21:06 +0000)
commit29d8b12b87dd890852b1e6aa3bfd856bcc31f622
tree6c053d381d8010a66972a60105675220c6a634c8
parent1b58913ddb3513061948cf09c54c6db727019e65
[PATCH 5/9] x86/speculation: Include unprivileged eBPF status in Spectre v2 mitigation reporting

commit 44a3918c8245ab10c6c9719dd12e7a8d291980d8 upstream.

With unprivileged eBPF enabled, eIBRS (without retpoline) is vulnerable
to Spectre v2 BHB-based attacks.

When both are enabled, print a warning message and report it in the
'spectre_v2' sysfs vulnerabilities file.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
[fllinden@amazon.com: backported to 5.10]
Signed-off-by: Frank van der Linden <fllinden@amazon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gbp-Pq: Topic bugfix/x86/bhb
Gbp-Pq: Name 0005-x86-speculation-Include-unprivileged-eBPF-status-in-.patch
arch/x86/kernel/cpu/bugs.c
include/linux/bpf.h
kernel/sysctl.c