[bpf-next v8 2/5] bpf: Pass bpf_verifier_env to JIT

Xu Kuohai xukuohai at huaweicloud.com
Mon Mar 9 23:44:23 PDT 2026


On 3/10/2026 12:56 AM, Anton Protopopov wrote:

[...]

>> -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)
>>   {
>>   	vm_dump(prog);
>>   
>>   	/* Was this program already translated? */
>>   	if (!prog->jited)
>> -		return do_normal_pass(prog);
>> +		return do_normal_pass(env, prog);
>>   	else
>> -		return do_extra_pass(prog);
>> +		return do_extra_pass(env, prog);
> 
> Why is this necessary to pass env all the way through jit_ctx_init?


Right, this is indeed stale code. In the earlier version, jit_ctx_init
invoked constants blinding function which required env. But constants
blinding was removed, passing env is not necessary now.

> All below looks good, so minus the above:
> 
> Reviewed-by: Anton Protopopov <a.s.protopopov at gmail.com>

Thanks for the reviewing!




More information about the linux-arm-kernel mailing list