Re: [PATCH bpf-next v2] bpf: Fix unaligned interpreter panic on JIT fallback path

From: Tiezhu Yang

Date: Sun Jun 14 2026 - 22:05:56 EST


On 2026/6/15 上午9:49, Leon Hwang wrote:
On 15/6/26 09:23, Tiezhu Yang wrote:
On 2026/6/12 下午8:37, Xu Kuohai wrote:
On 6/11/2026 6:12 PM, Tiezhu Yang wrote:
When an architecture implements bpf_jit_inlines_helper_call(), such
as LoongArch, ARM64, and RISC-V, the BPF verifier skips rewriting
the helper call offset (insn->imm) during the bpf_do_misc_fixups()
phase if the helper is expected to be inlined by the JIT compiler.
As a result, insn->imm remains as the raw helper enum ID.

...

+static void bpf_fixup_fallback_inline_helpers(struct
bpf_verifier_env *env, struct bpf_prog *fp)

The function name is a bit long for a static function

If there are no objections, I will shorten the static function
name to bpf_fixup_inline_helpers() in v4.


I think bpf_fixup_inline_helpers() is not accurate, since it is to fix
those non-inline helpers here. bpf_fixup_non_inline_helpers() is a
candidate. However, a shorter name is preferred.

I see your point. Indeed, we are fixing up the helpers that ultimately failed to be inlined on the fallback path.

How about shortening it to fixup_fallback_helpers()? Since it is a
static function, we can safely drop the bpf_ prefix to keep it concise,
clean, and accurate.If that looks good to you, I will use this name and
remove the redundant check in the next version.

Please provide changelog btw. For a single patch, you can provide
changelog here.

OK, no problem.

Thanks,
Tiezhu