[PATCH linux-6.12.y 0/4] bpf: Fix interpreter-unsupported insns
From: Leon Hwang
Date: Thu Nov 26 2026 - 10:30:17 EST
Request from Guillaume and Vincent [1][2], backport the following commits to
linux-6.12.y with editing the commits manually.
9a6df65d5c6a ("bpf: Introduce jit_required flag and remove bpf_prog_has_kfunc_call()")
f1c27922576e ("bpf: Reject programs with inlined helpers if JIT is not available")
34746b5a84ec ("bpf: Disallow interpreter fallback for arena-related insns")
7a0855e73757 ("bpf: Disallow interpreter fallback for BPF_ADDR_PERCPU insn")
As there was a big code refactoring in linux 7.1, the changes in the new
file kernel/bpf/fixups.c will be backported to the positions in
kernel/bpf/verifier.c.
Patch 1 introduces a new bit 'jit_required' in struct bpf_prog. The
other patches set 'jit_required' to fix the issues.
Links:
[1] https://lore.kernel.org/bpf/BESPR02MB12296D62B1B3F33BA21C4F24AF1432@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
[2] https://lore.kernel.org/bpf/MR1P264MB331494502C9D13D8A9EAFB99B7E82@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
Leon Hwang (2):
bpf: Disallow interpreter fallback for arena-related insns
bpf: Disallow interpreter fallback for BPF_ADDR_PERCPU insn
Tiezhu Yang (2):
bpf: Introduce jit_required flag and remove bpf_prog_has_kfunc_call()
bpf: Reject programs with inlined helpers if JIT is not available
include/linux/bpf.h | 22 +++++++++++++++-------
kernel/bpf/core.c | 7 ++-----
kernel/bpf/verifier.c | 21 ++++++++++++---------
3 files changed, 29 insertions(+), 21 deletions(-)
--
2.55.0