Lines Matching refs:prog

195 	struct bpf_prog *prog;		/* eBPF program being verified */  member
644 if (env->prog->aux->ops->is_valid_access && in check_ctx_access()
645 env->prog->aux->ops->is_valid_access(off, size, t)) in check_ctx_access()
947 if (env->prog->aux->ops->get_func_proto) in check_call()
948 fn = env->prog->aux->ops->get_func_proto(func_id); in check_call()
956 if (!env->prog->gpl_compatible && fn->gpl_only) { in check_call()
1356 if (!may_access_skb(env->prog->type)) { in check_ld_abs()
1458 if (w < 0 || w >= env->prog->len) { in push_insn()
1471 if (cur_stack >= env->prog->len) in push_insn()
1493 struct bpf_insn *insns = env->prog->insnsi; in check_cfg()
1494 int insn_cnt = env->prog->len; in check_cfg()
1709 struct bpf_insn *insns = env->prog->insnsi; in do_check()
1711 int insn_cnt = env->prog->len; in do_check()
1975 struct bpf_insn *insn = env->prog->insnsi; in replace_map_fd_with_map_ptr()
1976 int insn_cnt = env->prog->len; in replace_map_fd_with_map_ptr()
2075 struct bpf_insn *insn = env->prog->insnsi; in convert_pseudo_ld_imm64()
2076 int insn_cnt = env->prog->len; in convert_pseudo_ld_imm64()
2084 static void adjust_branches(struct bpf_prog *prog, int pos, int delta) in adjust_branches() argument
2086 struct bpf_insn *insn = prog->insnsi; in adjust_branches()
2087 int insn_cnt = prog->len; in adjust_branches()
2109 struct bpf_insn *insn = env->prog->insnsi; in convert_ctx_accesses()
2110 int insn_cnt = env->prog->len; in convert_ctx_accesses()
2117 if (!env->prog->aux->ops->convert_ctx_access) in convert_ctx_accesses()
2134 cnt = env->prog->aux->ops-> in convert_ctx_accesses()
2136 insn->off, insn_buf, env->prog); in convert_ctx_accesses()
2149 new_prog = bpf_prog_realloc(env->prog, in convert_ctx_accesses()
2167 env->prog = new_prog; in convert_ctx_accesses()
2183 for (i = 0; i < env->prog->len; i++) { in free_states()
2197 int bpf_check(struct bpf_prog **prog, union bpf_attr *attr) in bpf_check() argument
2203 if ((*prog)->len <= 0 || (*prog)->len > BPF_MAXINSNS) in bpf_check()
2213 env->prog = *prog; in bpf_check()
2245 env->explored_states = kcalloc(env->prog->len, in bpf_check()
2283 env->prog->aux->used_maps = kmalloc_array(env->used_map_cnt, in bpf_check()
2287 if (!env->prog->aux->used_maps) { in bpf_check()
2292 memcpy(env->prog->aux->used_maps, env->used_maps, in bpf_check()
2294 env->prog->aux->used_map_cnt = env->used_map_cnt; in bpf_check()
2306 if (!env->prog->aux->used_maps) in bpf_check()
2311 *prog = env->prog; in bpf_check()