Home
last modified time | relevance | path

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

/openbmc/linux/tools/testing/selftests/bpf/progs/
H A Dtest_static_linked1.c15 static __noinline int subprog(int x) in subprog() function
24 var1 = subprog(rovar1) + static_var1 + static_var2; in handler1()
H A Dtest_static_linked2.c15 static __noinline int subprog(int x) in subprog() function
24 var2 = subprog(rovar2) + static_var1 + static_var2; in handler2()
H A Dlinked_funcs2.c19 static __noinline int subprog(int x) in subprog() function
28 output_val2 = 2 * x + 2 * subprog(x); in set_output_val2()
H A Dlinked_funcs1.c19 static __noinline int subprog(int x) in subprog() function
28 output_val1 = x + subprog(x); in set_output_val1()
/openbmc/linux/drivers/net/ethernet/netronome/nfp/bpf/
H A 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()
H A Dmain.h541 struct nfp_bpf_subprog_info *subprog; member
H A Doffload.c182 kfree(nfp_prog->subprog); in nfp_prog_free()
H A 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()
/openbmc/linux/kernel/bpf/
H A 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()
2582 int subprog) in push_async_cb() argument
2615 subprog /* subprog number within this prog */); in push_async_cb()
3018 struct bpf_subprog_info *subprog = env->subprog_info; in add_subprog_and_kfunc() local
3049 subprog[env->subprog_cnt].start = insn_cnt; in add_subprog_and_kfunc()
3053 verbose(env, "func#%d @%d\n", i, subprog[i].start); in add_subprog_and_kfunc()
3061 struct bpf_subprog_info *subprog = env->subprog_info; in check_subprogs() local
3066 subprog_start = subprog[cur_subprog].start; in check_subprogs()
3067 subprog_end = subprog[cur_subprog + 1].start; in check_subprogs()
[all …]
H A Dbtf.c6876 int btf_check_subprog_arg_match(struct bpf_verifier_env *env, int subprog, in btf_check_subprog_arg_match() argument
6888 btf_id = prog->aux->func_info[subprog].type_id; in btf_check_subprog_arg_match()
6892 if (prog->aux->func_info_aux[subprog].unreliable) in btf_check_subprog_arg_match()
6895 is_global = prog->aux->func_info_aux[subprog].linkage == BTF_FUNC_GLOBAL; in btf_check_subprog_arg_match()
6903 prog->aux->func_info_aux[subprog].unreliable = true; in btf_check_subprog_arg_match()
6919 int btf_check_subprog_call(struct bpf_verifier_env *env, int subprog, in btf_check_subprog_call() argument
6931 btf_id = prog->aux->func_info[subprog].type_id; in btf_check_subprog_call()
6935 if (prog->aux->func_info_aux[subprog].unreliable) in btf_check_subprog_call()
6938 is_global = prog->aux->func_info_aux[subprog].linkage == BTF_FUNC_GLOBAL; in btf_check_subprog_call()
6946 prog->aux->func_info_aux[subprog].unreliable = true; in btf_check_subprog_call()
[all …]
/openbmc/linux/tools/lib/bpf/
H A Dlibbpf.c6214 static int append_subprog_relos(struct bpf_program *main_prog, struct bpf_program *subprog) in append_subprog_relos() argument
6216 int new_cnt = main_prog->nr_reloc + subprog->nr_reloc; in append_subprog_relos()
6220 if (main_prog == subprog) in append_subprog_relos()
6229 if (subprog->nr_reloc) in append_subprog_relos()
6230 memcpy(relos + main_prog->nr_reloc, subprog->reloc_desc, in append_subprog_relos()
6231 sizeof(*relos) * subprog->nr_reloc); in append_subprog_relos()
6234 relos[i].insn_idx += subprog->sub_insn_off; in append_subprog_relos()
6248 struct bpf_program *subprog; in bpf_object__reloc_code() local
6307 subprog = find_prog_by_sec_insn(obj, obj->efile.text_shndx, sub_insn_idx); in bpf_object__reloc_code()
6308 if (!subprog) { in bpf_object__reloc_code()
[all …]
/openbmc/linux/include/linux/
H A Dbpf.h2448 int btf_check_subprog_arg_match(struct bpf_verifier_env *env, int subprog,
2450 int btf_check_subprog_call(struct bpf_verifier_env *env, int subprog,
2452 int btf_prepare_func_args(struct bpf_verifier_env *env, int subprog,
/openbmc/linux/kernel/events/
H A Dcore.c9331 struct bpf_prog *subprog = prog->aux->func[i];
9335 (u64)(unsigned long)subprog->bpf_func, in perf_event_bpf_event()
9336 subprog->jited_len, unregister, in perf_event_bpf_event()
9337 subprog->aux->ksym.name); in perf_event_bpf_event()
9322 struct bpf_prog *subprog = prog->aux->func[i]; perf_event_bpf_emit_ksymbols() local