Home
last modified time | relevance | path

Searched refs:subprog (Results 1 - 22 of 22) sorted by relevance

/kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/
H A Dtest_static_linked2.c14 /* same "subprog" name in both files */
15 static __noinline int subprog(int x) in subprog() function
24 var2 = subprog(rovar2) + static_var1 + static_var2; in handler2()
H A Dtest_static_linked1.c14 /* same "subprog" name in both files */
15 static __noinline int subprog(int x) in subprog() function
24 var1 = subprog(rovar1) + static_var1 + static_var2; in handler1()
H A Dlinked_funcs2.c18 /* same "subprog" name in all files, but it's ok because they all are static */
19 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.c18 /* same "subprog" name in all files, but it's ok because they all are static */
19 static __noinline int subprog(int x) in subprog() function
28 output_val1 = x + subprog(x); in set_output_val1()
/kernel/linux/linux-5.10/drivers/net/ethernet/netronome/nfp/bpf/
H A Dverifier.c681 nfp_prog->subprog[index].needs_reg_push = 1; in nfp_assign_subprog_idx_and_regs()
709 frame_depths[frame] = nfp_prog->subprog[idx].stack_depth; in nfp_bpf_get_stack_usage()
721 * return to and subprog id. in nfp_bpf_get_stack_usage()
733 /* End of for() loop means the last instruction of the subprog was in nfp_bpf_get_stack_usage()
768 nfp_prog->subprog = kcalloc(nfp_prog->subprog_cnt, in nfp_bpf_finalize()
769 sizeof(nfp_prog->subprog[0]), GFP_KERNEL); in nfp_bpf_finalize()
770 if (!nfp_prog->subprog) in nfp_bpf_finalize()
777 nfp_prog->subprog[i].stack_depth = info[i].stack_depth; in nfp_bpf_finalize()
783 nfp_prog->subprog[i].stack_depth += REG_WIDTH; in nfp_bpf_finalize()
785 if (nfp_prog->subprog[ in nfp_bpf_finalize()
[all...]
H A Dmain.h509 * @subprog: pointer to an array of objects holding info about sub-programs
541 struct nfp_bpf_subprog_info *subprog; member
H A Doffload.c182 kfree(nfp_prog->subprog); in nfp_prog_free()
H A Djit.c3309 if (nfp_prog->subprog[meta->jmp_dst->subprog_idx].needs_reg_push) { in bpf_to_bpf_call()
3385 if (nfp_prog->subprog[meta->subprog_idx].needs_reg_push) { in nfp_subprog_epilogue()
3605 nfp_prog->subprog[jmp_dst->subprog_idx].needs_reg_push) { in nfp_fixup_branches()
3643 unsigned int depth = nfp_prog->subprog[meta->subprog_idx].stack_depth; in nfp_start_subprog()
3749 if (nfp_prog->subprog[idx].needs_reg_push) in nfp_prog_needs_callee_reg_save()
3831 depth = nfp_prog->subprog[0].stack_depth; in nfp_translate()
/kernel/linux/linux-6.6/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()
726 * return to and subprog id. in nfp_bpf_get_stack_usage()
738 /* End of for() loop means the last instruction of the subprog was 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[ in nfp_bpf_finalize()
[all...]
H A Dmain.h509 * @subprog: pointer to an array of objects holding info about sub-programs
541 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()
/kernel/linux/linux-5.10/kernel/bpf/
H A Dverifier.c1493 struct bpf_subprog_info *subprog = env->subprog_info; in check_subprogs() local
1502 /* determine subprog starts. The end is one before the next starts */ in check_subprogs()
1518 /* Add a fake 'exit' subprog which could simplify subprog iteration in check_subprogs()
1521 subprog[env->subprog_cnt].start = insn_cnt; in check_subprogs()
1525 verbose(env, "func#%d @%d\n", i, subprog[i].start); in check_subprogs()
1527 /* now check that all jumps are within the same subprog */ in check_subprogs()
1528 subprog_start = subprog[cur_subprog].start; in check_subprogs()
1529 subprog_end = subprog[cur_subprog + 1].start; in check_subprogs()
1536 subprog[cur_subpro in check_subprogs()
3484 struct bpf_subprog_info *subprog = env->subprog_info; check_max_stack_depth() local
3584 int start = idx + insn->imm + 1, subprog; get_callee_stack_depth() local
5355 int i, err, subprog, target_insn; check_func_call() local
11383 int i, j, subprog_start, subprog_end = 0, len, subprog; jit_subprogs() local
12021 do_check_common(struct bpf_verifier_env *env, int subprog) do_check_common() argument
12280 int ret = 0, subprog = -1, i; bpf_check_attach_target() local
[all...]
H A Dbtf.c5149 int btf_check_func_arg_match(struct bpf_verifier_env *env, int subprog, in btf_check_func_arg_match() argument
5163 btf_id = prog->aux->func_info[subprog].type_id; in btf_check_func_arg_match()
5167 if (prog->aux->func_info_aux[subprog].unreliable) in btf_check_func_arg_match()
5176 subprog); in btf_check_func_arg_match()
5235 prog->aux->func_info_aux[subprog].unreliable = true; in btf_check_func_arg_match()
5246 int btf_prepare_func_args(struct bpf_verifier_env *env, int subprog, in btf_prepare_func_args() argument
5259 prog->aux->func_info_aux[subprog].linkage != BTF_FUNC_GLOBAL) { in btf_prepare_func_args()
5264 btf_id = prog->aux->func_info[subprog].type_id; in btf_prepare_func_args()
5276 subprog); in btf_prepare_func_args()
5283 tname, subprog); in btf_prepare_func_args()
[all...]
/kernel/linux/linux-6.6/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()
2580 int subprog) in push_async_cb()
2613 subprog /* subprog number within this prog */); in push_async_cb()
2665 /* determine subprog starts. The end is one before the next starts */ in add_subprog()
3010 struct bpf_subprog_info *subprog = env->subprog_info; in add_subprog_and_kfunc() local
3038 /* Add a fake 'exit' subprog which could simplify subprog iteration in add_subprog_and_kfunc()
3041 subprog[en in add_subprog_and_kfunc()
2578 push_async_cb(struct bpf_verifier_env *env, int insn_idx, int prev_insn_idx, int subprog) push_async_cb() argument
3053 struct bpf_subprog_info *subprog = env->subprog_info; check_subprogs() local
3751 int subprog_insn_idx, subprog; backtrack_insn() local
5831 struct bpf_subprog_info *subprog = env->subprog_info; check_max_stack_depth_subprog() local
5960 int start = idx + insn->imm + 1, subprog; get_callee_stack_depth() local
9189 setup_func_entry(struct bpf_verifier_env *env, int subprog, int callsite, set_callee_state_fn set_callee_state_cb, struct bpf_verifier_state *state) setup_func_entry() argument
9240 push_callback_call(struct bpf_verifier_env *env, struct bpf_insn *insn, int insn_idx, int subprog, set_callee_state_fn set_callee_state_cb) push_callback_call() argument
9314 int err, subprog, target_insn; check_func_call() local
18437 int i, j, subprog_start, subprog_end = 0, len, subprog; jit_subprogs() local
19547 do_check_common(struct bpf_verifier_env *env, int subprog) do_check_common() argument
19798 int ret = 0, subprog = -1, i; bpf_check_attach_target() local
[all...]
H A 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] in btf_check_subprog_call()
6951 btf_prepare_func_args(struct bpf_verifier_env *env, int subprog, struct bpf_reg_state *regs) btf_prepare_func_args() argument
[all...]
/kernel/linux/linux-6.6/tools/lib/bpf/
H A Dlibbpf.c4123 /* loading subprog addresses */ in bpf_program__record_reloc()
4129 pr_warn("prog '%s': bad subprog addr relo against '%s' at offset %zu+%d\n", in bpf_program__record_reloc()
5834 /* When __weak subprog is "overridden" by another instance in bpf_object__relocate_core()
5835 * of the subprog from a different object file, linker still in bpf_object__relocate_core()
5840 * subprog instructions when discovering subprograms. in bpf_object__relocate_core()
6214 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 in append_subprog_relos()
6248 struct bpf_program *subprog; bpf_object__reloc_code() local
6454 struct bpf_program *subprog; bpf_object__relocate_calls() local
[all...]
/kernel/linux/linux-5.10/tools/lib/bpf/
H A Dlibbpf.c5957 /* When __weak subprog is "overridden" by another instance in bpf_object__relocate_core()
5958 * of the subprog from a different object file, linker still in bpf_object__relocate_core()
5963 * subprog instructions when discovering subprograms. in bpf_object__relocate_core()
6217 struct bpf_program *subprog; in bpf_object__reloc_code() local
6257 subprog = find_prog_by_sec_insn(obj, obj->efile.text_shndx, sub_insn_idx); in bpf_object__reloc_code()
6258 if (!subprog) { in bpf_object__reloc_code()
6265 * subprogram (meaning this subprog hasn't been processed in bpf_object__reloc_code()
6274 if (subprog->sub_insn_off == 0) { in bpf_object__reloc_code()
6275 subprog->sub_insn_off = main_prog->insns_cnt; in bpf_object__reloc_code()
6277 new_cnt = main_prog->insns_cnt + subprog in bpf_object__reloc_code()
6402 struct bpf_program *subprog; bpf_object__relocate_calls() local
[all...]
/kernel/linux/linux-6.6/include/linux/
H A Dbpf.h1451 * The subprog can access its first linfo by
1459 * The subprog can access its first jited_linfo by
1465 /* subprog can use linfo_idx to access its first linfo and
2423 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,
/kernel/linux/linux-5.10/include/linux/
H A Dbpf.h895 * The subprog can access its first linfo by
903 * The subprog can access its first jited_linfo by
909 /* subprog can use linfo_idx to access its first linfo and
1561 int btf_check_func_arg_match(struct bpf_verifier_env *env, int subprog,
1563 int btf_prepare_func_args(struct bpf_verifier_env *env, int subprog,
/kernel/linux/linux-5.10/kernel/events/
H A Dcore.c8814 struct bpf_prog *subprog = prog->aux->func[i]; in perf_event_bpf_emit_ksymbols() local
8818 (u64)(unsigned long)subprog->bpf_func, in perf_event_bpf_emit_ksymbols()
8819 subprog->jited_len, unregister, in perf_event_bpf_emit_ksymbols()
8820 subprog->aux->ksym.name); in perf_event_bpf_emit_ksymbols()
/kernel/linux/linux-6.6/kernel/events/
H A 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()

Completed in 115 milliseconds