Home
last modified time | relevance | path

Searched refs:subprog (Results 1 – 13 of 13) sorted by relevance

/linux-6.6.21/tools/testing/selftests/bpf/progs/
Dtest_static_linked1.c15 static __noinline int subprog(int x) in subprog() function
24 var1 = subprog(rovar1) + static_var1 + static_var2; in handler1()
Dtest_static_linked2.c15 static __noinline int subprog(int x) in subprog() function
24 var2 = subprog(rovar2) + static_var1 + static_var2; in handler2()
Dlinked_funcs1.c19 static __noinline int subprog(int x) in subprog() function
28 output_val1 = x + subprog(x); in set_output_val1()
Dlinked_funcs2.c19 static __noinline int subprog(int x) in subprog() function
28 output_val2 = 2 * x + 2 * subprog(x); in set_output_val2()
/linux-6.6.21/drivers/net/ethernet/netronome/nfp/bpf/
Dverifier.c686 nfp_prog->subprog[index].needs_reg_push = 1; in nfp_assign_subprog_idx_and_regs()
714 frame_depths[frame] = nfp_prog->subprog[idx].stack_depth; in nfp_bpf_get_stack_usage()
773 nfp_prog->subprog = kcalloc(nfp_prog->subprog_cnt, in nfp_bpf_finalize()
774 sizeof(nfp_prog->subprog[0]), GFP_KERNEL); in nfp_bpf_finalize()
775 if (!nfp_prog->subprog) in nfp_bpf_finalize()
782 nfp_prog->subprog[i].stack_depth = info[i].stack_depth; in nfp_bpf_finalize()
788 nfp_prog->subprog[i].stack_depth += REG_WIDTH; in nfp_bpf_finalize()
790 if (nfp_prog->subprog[i].needs_reg_push) in nfp_bpf_finalize()
791 nfp_prog->subprog[i].stack_depth += BPF_REG_SIZE * 4; in nfp_bpf_finalize()
Dmain.h541 struct nfp_bpf_subprog_info *subprog; member
Doffload.c182 kfree(nfp_prog->subprog); in nfp_prog_free()
Djit.c3315 if (nfp_prog->subprog[meta->jmp_dst->subprog_idx].needs_reg_push) { in bpf_to_bpf_call()
3391 if (nfp_prog->subprog[meta->subprog_idx].needs_reg_push) { in nfp_subprog_epilogue()
3611 nfp_prog->subprog[jmp_dst->subprog_idx].needs_reg_push) { in nfp_fixup_branches()
3649 unsigned int depth = nfp_prog->subprog[meta->subprog_idx].stack_depth; in nfp_start_subprog()
3755 if (nfp_prog->subprog[idx].needs_reg_push) in nfp_prog_needs_callee_reg_save()
3837 depth = nfp_prog->subprog[0].stack_depth; in nfp_translate()
/linux-6.6.21/kernel/bpf/
Dverifier.c491 static bool subprog_is_global(const struct bpf_verifier_env *env, int subprog) in subprog_is_global() argument
495 return aux && aux[subprog].linkage == BTF_FUNC_GLOBAL; in subprog_is_global()
2580 int subprog) in push_async_cb() argument
2613 subprog /* subprog number within this prog */); in push_async_cb()
3010 struct bpf_subprog_info *subprog = env->subprog_info; in add_subprog_and_kfunc() local
3041 subprog[env->subprog_cnt].start = insn_cnt; in add_subprog_and_kfunc()
3045 verbose(env, "func#%d @%d\n", i, subprog[i].start); in add_subprog_and_kfunc()
3053 struct bpf_subprog_info *subprog = env->subprog_info; in check_subprogs() local
3058 subprog_start = subprog[cur_subprog].start; in check_subprogs()
3059 subprog_end = subprog[cur_subprog + 1].start; in check_subprogs()
[all …]
Dbtf.c6870 int btf_check_subprog_arg_match(struct bpf_verifier_env *env, int subprog, in btf_check_subprog_arg_match() argument
6882 btf_id = prog->aux->func_info[subprog].type_id; in btf_check_subprog_arg_match()
6886 if (prog->aux->func_info_aux[subprog].unreliable) in btf_check_subprog_arg_match()
6889 is_global = prog->aux->func_info_aux[subprog].linkage == BTF_FUNC_GLOBAL; in btf_check_subprog_arg_match()
6897 prog->aux->func_info_aux[subprog].unreliable = true; in btf_check_subprog_arg_match()
6913 int btf_check_subprog_call(struct bpf_verifier_env *env, int subprog, in btf_check_subprog_call() argument
6925 btf_id = prog->aux->func_info[subprog].type_id; in btf_check_subprog_call()
6929 if (prog->aux->func_info_aux[subprog].unreliable) in btf_check_subprog_call()
6932 is_global = prog->aux->func_info_aux[subprog].linkage == BTF_FUNC_GLOBAL; in btf_check_subprog_call()
6940 prog->aux->func_info_aux[subprog].unreliable = true; in btf_check_subprog_call()
[all …]
/linux-6.6.21/tools/lib/bpf/
Dlibbpf.c6210 static int append_subprog_relos(struct bpf_program *main_prog, struct bpf_program *subprog) in append_subprog_relos() argument
6212 int new_cnt = main_prog->nr_reloc + subprog->nr_reloc; in append_subprog_relos()
6216 if (main_prog == subprog) in append_subprog_relos()
6225 if (subprog->nr_reloc) in append_subprog_relos()
6226 memcpy(relos + main_prog->nr_reloc, subprog->reloc_desc, in append_subprog_relos()
6227 sizeof(*relos) * subprog->nr_reloc); in append_subprog_relos()
6230 relos[i].insn_idx += subprog->sub_insn_off; in append_subprog_relos()
6244 struct bpf_program *subprog; in bpf_object__reloc_code() local
6303 subprog = find_prog_by_sec_insn(obj, obj->efile.text_shndx, sub_insn_idx); in bpf_object__reloc_code()
6304 if (!subprog) { in bpf_object__reloc_code()
[all …]
/linux-6.6.21/include/linux/
Dbpf.h2423 int btf_check_subprog_arg_match(struct bpf_verifier_env *env, int subprog,
2425 int btf_check_subprog_call(struct bpf_verifier_env *env, int subprog,
2427 int btf_prepare_func_args(struct bpf_verifier_env *env, int subprog,
/linux-6.6.21/kernel/events/
Dcore.c9268 struct bpf_prog *subprog = prog->aux->func[i]; in perf_event_bpf_emit_ksymbols() local
9272 (u64)(unsigned long)subprog->bpf_func, in perf_event_bpf_emit_ksymbols()
9273 subprog->jited_len, unregister, in perf_event_bpf_emit_ksymbols()
9274 subprog->aux->ksym.name); in perf_event_bpf_emit_ksymbols()