arm64: bpf: Only mitigate cBPF programs loaded by unprivileged users
authorJames Morse <james.morse@arm.com>
Tue, 29 Apr 2025 15:03:38 +0000 (16:03 +0100)
committerJames Morse <james.morse@arm.com>
Thu, 8 May 2025 14:29:03 +0000 (15:29 +0100)
commitf300769ead032513a68e4a02e806393402e626f8
treeab218adf54026c926d3549008b8bf3404bb6d708
parent0dfefc2ea2f29ced2416017d7e5b1253a54c2735
arm64: bpf: Only mitigate cBPF programs loaded by unprivileged users

Support for eBPF programs loaded by unprivileged users is typically
disabled. This means only cBPF programs need to be mitigated for BHB.

In addition, only mitigate cBPF programs that were loaded by an
unprivileged user. Privileged users can also load the same program
via eBPF, making the mitigation pointless.

Signed-off-by: James Morse <james.morse@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
arch/arm64/net/bpf_jit_comp.c