On Mon, 2024-02-12 at 18:58 -0800, Alexei Starovoitov wrote: [...] > Yes. Casting anything is fine. > I don't think we need to enforce anything. > Those insns will be llvm generated. If src_reg is somehow ptr_to_ctx > or something it's likely llvm bug or crazy manual type cast > by the user, but if they do so let them experience debug pains. > The kernel won't crash. Ok, makes sense. [...] > > > @@ -18235,6 +18272,31 @@ static int resolve_pseudo_ldimm64(struct bpf_verifier_env *env) > > > fdput(f); > > > return -EBUSY; > > > } > > > + if (map->map_type == BPF_MAP_TYPE_ARENA) { > > > + if (env->prog->aux->arena) { > > > > Does this have to be (env->prog->aux->arena && env->prog->aux->arena != map) ? > > No. all maps in used_maps[] are unique. > Adding "env->prog->aux->arena != map" won't make any difference. > It will only be confusing. Right, sorry, I missed the loop above that checks if map had been already seen.