[bpf-next v6 2/5] bpf: Pass bpf_verifier_env to jit
Xu Kuohai
xukuohai at huaweicloud.com
Fri Mar 6 23:35:23 PST 2026
On 3/7/2026 3:22 PM, Yeoreum Yun wrote:
> Hi,
>
>> On 3/7/2026 2:40 PM, Yeoreum Yun wrote:
>>> Hi,
>>>
>>> [...]
>>>
>>>> -struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
>>>> +struct bpf_prog *bpf_int_jit_compile(struct bpf_verifier_env *env, struct bpf_prog *prog)
>>>
>>> Does this also work for bpf_prepare_filter()?
>>> For example, ptp_classifier_init() calls it without invoking bpf_check(),
>>> so there is no env available in that context.
>>>
>>
>> It works. The original bpf_prog_select_runtime() is preserved for
>> cbpf and test code, and passes NULL env to bpf_int_jit_compile().
>
> Yes, I agree it work with the NULL when I see you patch but
> I mean I couldn't find out modification in bpf_prepare_filter()
> -- bpf_jit_compile(fp) -> bpf_jit_compile(NULL, fp)
>
bpf_jit_compile() is the old cbpf jit, no modification is required.
>
>
>
>>
>>> [...]
>>>
>>> Thanks.
>>>
>>> --
>>> Sincerely,
>>> Yeoreum Yun
>>>
>>>
>>
>
> --
> Sincerely,
> Yeoreum Yun
More information about the linux-arm-kernel
mailing list