Re: [bpf-next v8 2/5] bpf: Pass bpf_verifier_env to JIT
From: Xu Kuohai
Date: Tue Mar 10 2026 - 02:44:35 EST
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@xxxxxxxxx>
Thanks for the reviewing!