Lines Matching refs:prog

195 	struct bpf_prog *prog;		/* eBPF program being verified */  member
630 if (env->prog->aux->ops->is_valid_access && in check_ctx_access()
631 env->prog->aux->ops->is_valid_access(off, size, t)) in check_ctx_access()
851 if (env->prog->aux->ops->get_func_proto) in check_call()
852 fn = env->prog->aux->ops->get_func_proto(func_id); in check_call()
860 if (!env->prog->gpl_compatible && fn->gpl_only) { in check_call()
1224 if (!may_access_skb(env->prog->type)) { in check_ld_abs()
1325 if (w < 0 || w >= env->prog->len) { in push_insn()
1338 if (cur_stack >= env->prog->len) in push_insn()
1360 struct bpf_insn *insns = env->prog->insnsi; in check_cfg()
1361 int insn_cnt = env->prog->len; in check_cfg()
1576 struct bpf_insn *insns = env->prog->insnsi; in do_check()
1578 int insn_cnt = env->prog->len; in do_check()
1829 struct bpf_insn *insn = env->prog->insnsi; in replace_map_fd_with_map_ptr()
1830 int insn_cnt = env->prog->len; in replace_map_fd_with_map_ptr()
1923 struct bpf_insn *insn = env->prog->insnsi; in convert_pseudo_ld_imm64()
1924 int insn_cnt = env->prog->len; in convert_pseudo_ld_imm64()
1932 static void adjust_branches(struct bpf_prog *prog, int pos, int delta) in adjust_branches() argument
1934 struct bpf_insn *insn = prog->insnsi; in adjust_branches()
1935 int insn_cnt = prog->len; in adjust_branches()
1957 struct bpf_insn *insn = env->prog->insnsi; in convert_ctx_accesses()
1958 int insn_cnt = env->prog->len; in convert_ctx_accesses()
1964 if (!env->prog->aux->ops->convert_ctx_access) in convert_ctx_accesses()
1977 cnt = env->prog->aux->ops-> in convert_ctx_accesses()
1992 new_prog = bpf_prog_realloc(env->prog, in convert_ctx_accesses()
2010 env->prog = new_prog; in convert_ctx_accesses()
2026 for (i = 0; i < env->prog->len; i++) { in free_states()
2040 int bpf_check(struct bpf_prog **prog, union bpf_attr *attr) in bpf_check() argument
2046 if ((*prog)->len <= 0 || (*prog)->len > BPF_MAXINSNS) in bpf_check()
2056 env->prog = *prog; in bpf_check()
2088 env->explored_states = kcalloc(env->prog->len, in bpf_check()
2124 env->prog->aux->used_maps = kmalloc_array(env->used_map_cnt, in bpf_check()
2128 if (!env->prog->aux->used_maps) { in bpf_check()
2133 memcpy(env->prog->aux->used_maps, env->used_maps, in bpf_check()
2135 env->prog->aux->used_map_cnt = env->used_map_cnt; in bpf_check()
2147 if (!env->prog->aux->used_maps) in bpf_check()
2152 *prog = env->prog; in bpf_check()