linux/arch/riscv/net
Pawan Gupta 0bb99f2cfa bpf: Restrict JIT predictor flush to cBPF
Currently predictor flush on memory reuse is done for all BPF JIT
allocations, but only cBPF programs can be loaded by an unprivileged user.
eBPF is privileged by default, and flushing predictors for all CPUs on
every eBPF reuse penalizes the common case for no security benefit.

eBPF allocations can be frequent on busy systems, only flush predictors
for cBPF programs. Trampoline and dispatcher allocations also skip the
flush as they are eBPF-only.

Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2026-07-01 10:33:38 +02:00
..
bpf_jit_comp32.c riscv, bpf: Introduce shift add helper with Zba optimization 2024-06-03 16:45:23 +02:00
bpf_jit_comp64.c bpf: Restrict JIT predictor flush to cBPF 2026-07-01 10:33:38 +02:00
bpf_jit_core.c bpf: Restrict JIT predictor flush to cBPF 2026-07-01 10:33:38 +02:00
bpf_jit.h bpf, riscv: Remove redundant bpf_flush_icache() after pack allocator finalize 2026-04-15 12:09:46 -07:00
Makefile riscv, bpf: Add RV32G eBPF JIT 2020-03-05 16:13:47 +01:00