Home
last modified time | relevance | path

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

/linux/kernel/bpf/
H A Dcfg.c53 struct bpf_subprog_info *subprog; in mark_subprog_changes_pkt_data() local
55 subprog = bpf_find_containing_subprog(env, off); in mark_subprog_changes_pkt_data()
56 subprog->changes_pkt_data = true; in mark_subprog_changes_pkt_data()
61 struct bpf_subprog_info *subprog; in mark_subprog_might_sleep() local
63 subprog = bpf_find_containing_subprog(env, off); in mark_subprog_might_sleep()
64 subprog->might_sleep = true; in mark_subprog_might_sleep()
69 struct bpf_subprog_info *subprog; in mark_subprog_might_throw() local
71 subprog = bpf_find_containing_subprog(env, off); in mark_subprog_might_throw()
72 subprog->might_throw = true; in mark_subprog_might_throw()
329 struct bpf_subprog_info *subprog; in create_jt() local
[all …]
H A Dliveness.c26 u32 callsite; /* call insn that invoked this subprog (subprog_start for depth 0) */
27 u32 depth; /* call depth (0 = entry subprog) */
28 u32 subprog; /* subprog index */ member
29 u32 subprog_start; /* cached env->subprog_info[subprog].start */
51 * For depth == 0 (entry subprog), @callsite is the subprog start insn.
52 * For depth > 0, @callsite is the call instruction index that invoked the subprog.
76 u32 callsite, int subprog) in call_instance() argument
79 u32 subprog_start = env->subprog_info[subprog] in call_instance()
311 struct bpf_subprog_info *subprog; update_instance() local
408 fmt_subprog(struct bpf_verifier_env * env,int subprog) fmt_subprog() argument
1453 print_subprog_arg_access(struct bpf_verifier_env * env,int subprog,struct subprog_at_info * info,struct arg_track (* at_stack_in)[MAX_ARG_SPILL_SLOTS]) print_subprog_arg_access() argument
1538 int subprog = instance->subprog; compute_subprog_args() local
1762 int subprog = instance->subprog; analyze_subprog() local
[all...]
H A Dfixups.c146 int start = idx + insn->imm + 1, subprog; in get_callee_stack_depth() local
148 subprog = bpf_find_subprog(env, start); in get_callee_stack_depth()
149 if (verifier_bug_if(subprog < 0, env, "get stack depth: no program at insn %d", start)) in get_callee_stack_depth()
151 return env->subprog_info[subprog].stack_depth; in get_callee_stack_depth()
206 /* NOTE: fake 'exit' subprog should be updated as well. */ in adjust_subprog_starts()
340 /* move fake 'exit' subprog as well */ in adjust_subprog_starts_after_remove()
366 /* update fake 'exit' subprog as well */ in adjust_subprog_starts_after_remove()
1004 /* restore the start of fake 'exit' subprog as well */ in bpf_restore_subprog_starts()
1031 int i, j, subprog_start, subprog_end = 0, len, subprog; in jit_subprogs() local
1045 subprog in jit_subprogs()
2547 struct bpf_subprog_info *subprog = env->subprog_info; bpf_remove_fastcall_spills_fills() local
[all...]
H A Dverifier.c395 bool bpf_subprog_is_global(const struct bpf_verifier_env *env, int subprog) in reg_may_point_to_spin_lock()
399 return aux && aux[subprog].linkage == BTF_FUNC_GLOBAL;
402 static bool subprog_returns_void(struct bpf_verifier_env *env, int subprog) in type_is_rdonly_mem()
408 btf_id = env->prog->aux->func_info[subprog].type_id; in is_acquire_function()
425 static const char *subprog_name(const struct bpf_verifier_env *env, int subprog) in is_ptr_cast_function()
432 info = &env->prog->aux->func_info[subprog]; in is_ptr_cast_function()
436 void bpf_mark_subprog_exc_cb(struct bpf_verifier_env *env, int subprog)
438 struct bpf_subprog_info *info = subprog_info(env, subprog); in is_dynptr_ref_function()
445 static bool subprog_is_exc_cb(struct bpf_verifier_env *env, int subprog)
447 return subprog_info(env, subprog)
340 bpf_subprog_is_global(const struct bpf_verifier_env * env,int subprog) bpf_subprog_is_global() argument
347 subprog_returns_void(struct bpf_verifier_env * env,int subprog) subprog_returns_void() argument
370 subprog_name(const struct bpf_verifier_env * env,int subprog) subprog_name() argument
381 bpf_mark_subprog_exc_cb(struct bpf_verifier_env * env,int subprog) bpf_mark_subprog_exc_cb() argument
390 subprog_is_exc_cb(struct bpf_verifier_env * env,int subprog) subprog_is_exc_cb() argument
2588 push_async_cb(struct bpf_verifier_env * env,int insn_idx,int prev_insn_idx,int subprog,bool is_sleepable) push_async_cb() argument
3093 struct bpf_subprog_info *subprog = env->subprog_info; add_subprog_and_kfunc() local
3157 struct bpf_subprog_info *subprog = env->subprog_info; check_subprogs() local
3773 struct bpf_subprog_info *subprog = &env->subprog_info[state->subprogno]; check_fastcall_stack_contract() local
5330 struct bpf_subprog_info *subprog = env->subprog_info; check_max_stack_depth_subprog() local
9255 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
9303 btf_check_func_arg_match(struct bpf_verifier_env * env,int subprog,const struct btf * btf,struct bpf_reg_state * regs) btf_check_func_arg_match() argument
9404 btf_check_subprog_call(struct bpf_verifier_env * env,int subprog,struct bpf_reg_state * regs) btf_check_subprog_call() argument
9433 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
9509 int err, subprog, target_insn; check_func_call() local
17136 mark_fastcall_pattern_for_call(struct bpf_verifier_env * env,struct bpf_subprog_info * subprog,int insn_idx,s16 lowest_off) mark_fastcall_pattern_for_call() argument
17224 struct bpf_subprog_info *subprog = env->subprog_info; mark_fastcall_patterns() local
18689 do_check_common(struct bpf_verifier_env * env,int subprog) do_check_common() argument
19156 int ret = 0, subprog = -1, i; bpf_check_attach_target() local
[all...]
H A Dbtf.c7906 const struct btf_type *t, int subprog) in btf_prepare_func_args()
7922 if (subprog && (tags & ARG_TAG_ARENA) && btf_type_is_ptr(t)) in btf_prepare_func_args()
7934 * is cached in subprog info for reuse. in btf_prepare_func_args()
7940 int btf_prepare_func_args(struct bpf_verifier_env *env, int subprog) in btf_prepare_func_args()
7942 bool is_global = subprog_aux(env, subprog)->linkage == BTF_FUNC_GLOBAL; in btf_prepare_func_args()
7943 struct bpf_subprog_info *sub = subprog_info(env, subprog); in btf_prepare_func_args()
7962 btf_id = prog->aux->func_info[subprog].type_id; in btf_prepare_func_args()
7976 subprog); in btf_prepare_func_args()
7981 if (prog->aux->func_info_aux[subprog].unreliable) { in btf_prepare_func_args()
8016 err = btf_validate_return_type(env, btf, t, subprog); in btf_prepare_func_args()
7836 btf_prepare_func_args(struct bpf_verifier_env * env,int subprog) btf_prepare_func_args() argument
[all...]
/linux/tools/testing/selftests/bpf/progs/
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 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 Depilogue_tailcall.c12 static __noinline __used int subprog(struct st_ops_args *args) in subprog() function
21 subprog(args); in BPF_PROG()
H A Dexceptions.c53 * static subprog, hence verifier will DCE the remaining instructions. Ensure we
172 __noinline static int subprog(struct __sk_buff *ctx) in global_subprog()
201 return subprog(ctx); in assert_nz_gfunc()
158 __noinline static int subprog(struct __sk_buff *ctx) subprog() function
H A Dpro_epilogue.c17 static __noinline __used int subprog(struct st_ops_args *args) in subprog() function
/linux/include/linux/
H A Dbpf_verifier.h362 /* subprog number == index within subprog_info
363 * zero == main subprog
718 * const_reg_subprog_mask: subprog pointers, val is subprog number.
946 /* subprog indices sorted in topological order: leaves first, callers last */ in bpf_helper_call()
1021 static inline struct bpf_func_info_aux *subprog_aux(struct bpf_verifier_env *env, int subprog) in mark_jmp_point()
1023 return &env->prog->aux->func_info_aux[subprog]; in mark_jmp_point()
1026 static inline struct bpf_subprog_info *subprog_info(struct bpf_verifier_env *env, int subprog) in cur_func()
1028 return &env->subprog_info[subprog]; in cur_func()
1407 bool bpf_subprog_is_global(const struct bpf_verifier_env *env, int subprog);
928 subprog_aux(struct bpf_verifier_env * env,int subprog) subprog_aux() argument
933 subprog_info(struct bpf_verifier_env * env,int subprog) subprog_info() argument
[all...]
H A Dbpf.h1833 * The subprog can access its first linfo by
1841 * The subprog can access its first jited_linfo by
1847 /* subprog can use linfo_idx to access its first linfo and
3158 int btf_prepare_func_args(struct bpf_verifier_env *env, int subprog);
/linux/tools/lib/bpf/
H A Dlibbpf.c4690 /* loading subprog addresses */ in bpf_program__record_reloc()
4696 pr_warn("prog '%s': bad subprog addr relo against '%s' at offset %zu+%d\n", in bpf_program__record_reloc()
6138 /* When __weak subprog is "overridden" by another instance in bpf_object__relocate_core()
6139 * of the subprog from a different object file, linker still in bpf_object__relocate_core()
6144 * subprog instructions when discovering subprograms.
6687 static int append_subprog_relos(struct bpf_program *main_prog, struct bpf_program *subprog) in bpf_object__append_subprog_code()
6689 int new_cnt = main_prog->nr_reloc + subprog->nr_reloc; in bpf_object__append_subprog_code()
6693 if (main_prog == subprog) in bpf_object__append_subprog_code()
6702 if (subprog->nr_reloc) in bpf_object__append_subprog_code()
6703 memcpy(relos + main_prog->nr_reloc, subprog in bpf_object__append_subprog_code()
6627 append_subprog_relos(struct bpf_program * main_prog,struct bpf_program * subprog) append_subprog_relos() argument
6656 save_subprog_offsets(struct bpf_program * main_prog,struct bpf_program * subprog) save_subprog_offsets() argument
6676 bpf_object__append_subprog_code(struct bpf_object * obj,struct bpf_program * main_prog,struct bpf_program * subprog) bpf_object__append_subprog_code() argument
6719 struct bpf_program *subprog; bpf_object__reloc_code() local
6907 struct bpf_program *subprog; bpf_object__relocate_calls() local
7018 struct bpf_program *subprog = &obj->programs[j]; bpf_prog_assign_exc_cb() local
7444 struct bpf_program *subprog = &obj->programs[prog->exception_cb_idx]; bpf_object__relocate() local
[all...]
/linux/drivers/net/ethernet/netronome/nfp/bpf/
H A Dmain.h541 struct nfp_bpf_subprog_info *subprog; member
H A Doffload.c180 kfree(nfp_prog->subprog); in nfp_prog_free()
/linux/kernel/events/
H A Dcore.c10333 struct bpf_prog *subprog = prog->aux->func[i]; in perf_event_bpf_event()
10337 (u64)(unsigned long)subprog->bpf_func, in perf_event_bpf_event()
10338 subprog->jited_len, unregister, in perf_event_bpf_event()
10339 subprog->aux->ksym.name); in perf_event_bpf_event()
10305 struct bpf_prog *subprog = prog->aux->func[i]; perf_event_bpf_emit_ksymbols() local