Lines Matching refs:subprog

1475 	struct bpf_subprog_info *subprog = env->subprog_info;  in check_subprogs()  local
1503 subprog[env->subprog_cnt].start = insn_cnt; in check_subprogs()
1507 verbose(env, "func#%d @%d\n", i, subprog[i].start); in check_subprogs()
1510 subprog_start = subprog[cur_subprog].start; in check_subprogs()
1511 subprog_end = subprog[cur_subprog + 1].start; in check_subprogs()
1518 subprog[cur_subprog].has_tail_call = true; in check_subprogs()
1521 subprog[cur_subprog].has_ld_abs = true; in check_subprogs()
1545 subprog_end = subprog[cur_subprog + 1].start; in check_subprogs()
3023 struct bpf_subprog_info *subprog = env->subprog_info; in check_max_stack_depth() local
3050 if (idx && subprog[idx].has_tail_call && depth >= 256) { in check_max_stack_depth()
3059 depth += round_up(max_t(u32, subprog[idx].stack_depth, 1), 32); in check_max_stack_depth()
3066 subprog_end = subprog[idx + 1].start; in check_max_stack_depth()
3085 if (subprog[idx].has_tail_call) in check_max_stack_depth()
3103 subprog[ret_prog[j]].tail_call_reachable = true; in check_max_stack_depth()
3110 depth -= round_up(max_t(u32, subprog[idx].stack_depth, 1), 32); in check_max_stack_depth()
3121 int start = idx + insn->imm + 1, subprog; in get_callee_stack_depth() local
3123 subprog = find_subprog(env, start); in get_callee_stack_depth()
3124 if (subprog < 0) { in get_callee_stack_depth()
3129 return env->subprog_info[subprog].stack_depth; in get_callee_stack_depth()
4745 int i, err, subprog, target_insn; in check_func_call() local
4755 subprog = find_subprog(env, target_insn + 1); in check_func_call()
4756 if (subprog < 0) { in check_func_call()
4771 is_global = func_info_aux[subprog].linkage == BTF_FUNC_GLOBAL; in check_func_call()
4772 err = btf_check_func_arg_match(env, subprog, caller->regs); in check_func_call()
4778 subprog); in check_func_call()
4784 subprog); in check_func_call()
4808 subprog /* subprog number within this prog */); in check_func_call()
10573 int i, j, subprog_start, subprog_end = 0, len, subprog; in jit_subprogs() local
10590 subprog = find_subprog(env, i + insn->imm + 1); in jit_subprogs()
10591 if (subprog < 0) { in jit_subprogs()
10599 insn->off = subprog; in jit_subprogs()
10716 subprog = insn->off; in jit_subprogs()
10717 insn->imm = BPF_CAST_CALL(func[subprog]->bpf_func) - in jit_subprogs()
10763 subprog = find_subprog(env, i + insn->off + 1); in jit_subprogs()
10764 insn->imm = subprog; in jit_subprogs()
11254 static int do_check_common(struct bpf_verifier_env *env, int subprog) in do_check_common() argument
11279 subprog); in do_check_common()
11282 if (subprog || env->prog->type == BPF_PROG_TYPE_EXT) { in do_check_common()
11283 ret = btf_prepare_func_args(env, subprog, regs); in do_check_common()
11296 ret = btf_check_func_arg_match(env, subprog, regs); in do_check_common()
11508 int ret = 0, subprog = -1, i; in bpf_check_attach_target() local
11540 subprog = i; in bpf_check_attach_target()
11543 if (subprog == -1) { in bpf_check_attach_target()
11547 conservative = aux->func_info_aux[subprog].unreliable; in bpf_check_attach_target()
11675 if (subprog == 0) in bpf_check_attach_target()
11678 addr = (long) tgt_prog->aux->func[subprog]->bpf_func; in bpf_check_attach_target()