On 2026/7/1 下午3:02, Leon Hwang wrote:
On 1/7/26 14:49, Tiezhu Yang wrote:
[...]

It is a real issue.

Instead of fixing up helper calls, it seems better to prevent
interpreter fallback if the prog has any JIT-inlineable helper call.

Hi Alexei and Leon,

What about the following: (not tested yet, if it is good, I can test it)

[...]

If you are OK with the above changes, I will test it again and send
a new version later.


If you don't mind, I think I can disallow the interpreter fallback by
the below diff in the next revision of this series.

The 'aux->jit_required' is introduced by following Alexei's suggestion.

I am not sure if introducing a new aux->jit_required member is necessary,
as we already have a local jit_needed flag in the current logic.

Additionally, the issue reported in my patch [1] is fundamentally tied
to bpf_jit_inlines_helper_call(). Maybe we can simply reuse jit_needed
by checking bpf_prog_has_inline_helpers() right before JITing, and then
reject fallback with -ENOTSUPP if JIT compilation fails.

Let us wait for Alexei's comments on the overall direction before
respinning.

[1] bpf: Fix unaligned interpreter panic on JIT fallback path
https://lore.kernel.org/bpf/[email protected]/

Thanks,
Tiezhu


Reply via email to