Lines Matching refs:subprog

1781 						int subprog)  in push_async_cb()  argument
1814 subprog /* subprog number within this prog */); in push_async_cb()
2179 struct bpf_subprog_info *subprog = env->subprog_info; in add_subprog_and_kfunc() local
2210 subprog[env->subprog_cnt].start = insn_cnt; in add_subprog_and_kfunc()
2214 verbose(env, "func#%d @%d\n", i, subprog[i].start); in add_subprog_and_kfunc()
2222 struct bpf_subprog_info *subprog = env->subprog_info; in check_subprogs() local
2227 subprog_start = subprog[cur_subprog].start; in check_subprogs()
2228 subprog_end = subprog[cur_subprog + 1].start; in check_subprogs()
2235 subprog[cur_subprog].has_tail_call = true; in check_subprogs()
2238 subprog[cur_subprog].has_ld_abs = true; in check_subprogs()
2262 subprog_end = subprog[cur_subprog + 1].start; in check_subprogs()
4233 struct bpf_subprog_info *subprog = env->subprog_info; in check_max_stack_depth() local
4260 if (idx && subprog[idx].has_tail_call && depth >= 256) { in check_max_stack_depth()
4269 depth += round_up(max_t(u32, subprog[idx].stack_depth, 1), 32); in check_max_stack_depth()
4276 subprog_end = subprog[idx + 1].start; in check_max_stack_depth()
4294 if (subprog[idx].is_async_cb) { in check_max_stack_depth()
4295 if (subprog[idx].has_tail_call) { in check_max_stack_depth()
4304 if (subprog[idx].has_tail_call) in check_max_stack_depth()
4322 subprog[ret_prog[j]].tail_call_reachable = true; in check_max_stack_depth()
4323 if (subprog[0].tail_call_reachable) in check_max_stack_depth()
4331 depth -= round_up(max_t(u32, subprog[idx].stack_depth, 1), 32); in check_max_stack_depth()
4342 int start = idx + insn->imm + 1, subprog; in get_callee_stack_depth() local
4344 subprog = find_subprog(env, start); in get_callee_stack_depth()
4345 if (subprog < 0) { in get_callee_stack_depth()
4350 return env->subprog_info[subprog].stack_depth; in get_callee_stack_depth()
6655 int *insn_idx, int subprog, in __check_func_call() argument
6679 is_global = func_info_aux[subprog].linkage == BTF_FUNC_GLOBAL; in __check_func_call()
6680 err = btf_check_subprog_call(env, subprog, caller->regs); in __check_func_call()
6686 subprog); in __check_func_call()
6692 subprog); in __check_func_call()
6710 env->subprog_info[subprog].is_async_cb = true; in __check_func_call()
6711 async_cb = push_async_cb(env, env->subprog_info[subprog].start, in __check_func_call()
6712 *insn_idx, subprog); in __check_func_call()
6743 subprog /* subprog number within this prog */); in __check_func_call()
6760 *insn_idx = env->subprog_info[subprog].start - 1; in __check_func_call()
6820 int subprog, target_insn; in check_func_call() local
6823 subprog = find_subprog(env, target_insn); in check_func_call()
6824 if (subprog < 0) { in check_func_call()
6830 return __check_func_call(env, insn, insn_idx, subprog, set_callee_state); in check_func_call()
13605 int i, j, subprog_start, subprog_end = 0, len, subprog; in jit_subprogs() local
13622 subprog = find_subprog(env, i + insn->imm + 1); in jit_subprogs()
13623 if (subprog < 0) { in jit_subprogs()
13631 insn->off = subprog; in jit_subprogs()
13727 subprog = insn->off; in jit_subprogs()
13728 insn[0].imm = (u32)(long)func[subprog]->bpf_func; in jit_subprogs()
13729 insn[1].imm = ((u64)(long)func[subprog]->bpf_func) >> 32; in jit_subprogs()
13734 subprog = insn->off; in jit_subprogs()
13735 insn->imm = BPF_CALL_IMM(func[subprog]->bpf_func); in jit_subprogs()
13785 subprog = find_subprog(env, i + insn->off + 1); in jit_subprogs()
13786 insn->imm = subprog; in jit_subprogs()
14593 static int do_check_common(struct bpf_verifier_env *env, int subprog) in do_check_common() argument
14618 subprog); in do_check_common()
14621 if (subprog || env->prog->type == BPF_PROG_TYPE_EXT) { in do_check_common()
14622 ret = btf_prepare_func_args(env, subprog, regs); in do_check_common()
14642 ret = btf_check_subprog_arg_match(env, subprog, regs); in do_check_common()
14842 int ret = 0, subprog = -1, i; in bpf_check_attach_target() local
14874 subprog = i; in bpf_check_attach_target()
14877 if (subprog == -1) { in bpf_check_attach_target()
14881 conservative = aux->func_info_aux[subprog].unreliable; in bpf_check_attach_target()
15010 if (subprog == 0) in bpf_check_attach_target()
15013 addr = (long) tgt_prog->aux->func[subprog]->bpf_func; in bpf_check_attach_target()