Home
last modified time | relevance | path

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

/linux/kernel/bpf/
H A Dcfg.c54 struct bpf_subprog_info *subprog; in mark_subprog_changes_pkt_data() local
56 subprog = bpf_find_containing_subprog(env, off); in mark_subprog_changes_pkt_data()
57 subprog->changes_pkt_data = true; in mark_subprog_changes_pkt_data()
62 struct bpf_subprog_info *subprog; in mark_subprog_might_sleep() local
64 subprog = bpf_find_containing_subprog(env, off); in mark_subprog_might_sleep()
65 subprog->might_sleep = true; in mark_subprog_might_sleep()
70 struct bpf_subprog_info *subprog; in mark_subprog_might_throw() local
72 subprog = bpf_find_containing_subprog(env, off); in mark_subprog_might_throw()
73 subprog->might_throw = true; in mark_subprog_might_throw()
345 struct bpf_subprog_info *subprog; in create_jt() local
[all …]
H A Dliveness.c28 u32 subprog; /* subprog index */ member
76 u32 callsite, int subprog) in call_instance() argument
79 u32 subprog_start = env->subprog_info[subprog].start; in call_instance()
93 f->subprog = subprog; in call_instance()
95 f->insn_cnt = (env->subprog_info + subprog + 1)->start - subprog_start; in call_instance()
310 struct bpf_subprog_info *subprog; in update_instance() local
314 subprog = &env->subprog_info[instance->subprog]; in update_instance()
315 po_start = subprog->postorder_start; in update_instance()
316 po_end = (subprog + 1)->postorder_start; in update_instance()
407 static char *fmt_subprog(struct bpf_verifier_env *env, int subprog) in fmt_subprog() argument
[all …]
H A Dfixups.c208 int start = idx + insn->imm + 1, subprog; in get_callee_stack_depth() local
210 subprog = bpf_find_subprog(env, start); in get_callee_stack_depth()
211 if (verifier_bug_if(subprog < 0, env, "get stack depth: no program at insn %d", start)) in get_callee_stack_depth()
213 return env->subprog_info[subprog].stack_depth; in get_callee_stack_depth()
1094 int i, j, subprog_start, subprog_end = 0, len, subprog; in jit_subprogs() local
1108 subprog = bpf_find_subprog(env, i + insn->imm + 1); in jit_subprogs()
1109 if (verifier_bug_if(subprog < 0, env, "No program to jit at insn %d", in jit_subprogs()
1115 insn->off = subprog; in jit_subprogs()
1244 subprog = insn->off; in jit_subprogs()
1245 insn[0].imm = (u32)(long)func[subprog]->bpf_func; in jit_subprogs()
[all …]
H A Dverifier.c390 bool bpf_subprog_is_global(const struct bpf_verifier_env *env, int subprog) in bpf_subprog_is_global() argument
394 return aux && aux[subprog].linkage == BTF_FUNC_GLOBAL; in bpf_subprog_is_global()
397 static bool subprog_returns_void(struct bpf_verifier_env *env, int subprog) in subprog_returns_void() argument
403 btf_id = env->prog->aux->func_info[subprog].type_id; in subprog_returns_void()
420 const char *bpf_subprog_name(const struct bpf_verifier_env *env, int subprog) in bpf_subprog_name() argument
427 info = &env->prog->aux->func_info[subprog]; in bpf_subprog_name()
431 void bpf_mark_subprog_exc_cb(struct bpf_verifier_env *env, int subprog) in bpf_mark_subprog_exc_cb() argument
433 struct bpf_subprog_info *info = subprog_info(env, subprog); in bpf_mark_subprog_exc_cb()
440 static bool subprog_is_exc_cb(struct bpf_verifier_env *env, int subprog) in subprog_is_exc_cb() argument
442 return subprog_info(env, subprog) in subprog_is_exc_cb()
2314 push_async_cb(struct bpf_verifier_env * env,int insn_idx,int prev_insn_idx,int subprog,bool is_sleepable) push_async_cb() argument
2923 struct bpf_subprog_info *subprog = env->subprog_info; add_subprogs() local
3020 struct bpf_subprog_info *subprog = env->subprog_info; check_subprogs() local
3485 struct bpf_subprog_info *subprog = &env->subprog_info[state->subprogno]; check_fastcall_stack_contract() local
4176 struct bpf_subprog_info *subprog = &env->subprog_info[state->subprogno]; check_stack_arg_write() local
4218 struct bpf_subprog_info *subprog = &env->subprog_info[state->subprogno]; check_stack_arg_read() local
5326 struct bpf_subprog_info *subprog = env->subprog_info; check_max_stack_depth_subprog() local
9634 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
9682 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
9826 btf_check_subprog_call(struct bpf_verifier_env * env,int subprog,struct bpf_reg_state * regs) btf_check_subprog_call() argument
9855 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
9933 int err, subprog, target_insn; check_func_call() local
17840 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
17932 struct bpf_subprog_info *subprog = env->subprog_info; mark_fastcall_patterns() local
19483 do_check_common(struct bpf_verifier_env * env,int subprog,bool is_sleepable) do_check_common() argument
20114 int ret = 0, subprog = -1, i; bpf_check_attach_target() local
[all...]
H A Dconst_fold.c149 int subprog = bpf_find_subprog(env, idx + insn->imm + 1); in const_reg_xfer() local
151 if (subprog >= 0) { in const_reg_xfer()
153 dst->val = subprog; in const_reg_xfer()
H A Dbacktrack.c410 int subprog_insn_idx, subprog; in backtrack_insn() local
413 subprog = bpf_find_subprog(env, subprog_insn_idx); in backtrack_insn()
414 if (subprog < 0) in backtrack_insn()
417 if (bpf_subprog_is_global(env, subprog)) { in backtrack_insn()
H A Ddiagnostics.c806 const struct bpf_subprog_info *subprog; in bpf_diag_source() local
841 subprog = bpf_find_containing_subprog(env, insn_idx); in bpf_diag_source()
842 subprogno = subprog ? subprog - env->subprog_info : -ENOENT; in bpf_diag_source()
859 linfo_start = subprog ? subprog->linfo_idx : 0; in bpf_diag_source()
H A Dbtf.c8020 const struct btf_type *t, int subprog) in btf_validate_return_type() argument
8036 if (subprog && (tags & ARG_TAG_ARENA) && btf_type_is_ptr(t)) in btf_validate_return_type()
8054 int btf_prepare_func_args(struct bpf_verifier_env *env, int subprog) in btf_prepare_func_args() argument
8056 bool is_global = subprog_aux(env, subprog)->linkage == BTF_FUNC_GLOBAL; in btf_prepare_func_args()
8057 struct bpf_subprog_info *sub = subprog_info(env, subprog); in btf_prepare_func_args()
8076 btf_id = prog->aux->func_info[subprog].type_id; in btf_prepare_func_args()
8090 subprog); in btf_prepare_func_args()
8095 if (prog->aux->func_info_aux[subprog].unreliable) { in btf_prepare_func_args()
8130 err = btf_validate_return_type(env, btf, t, subprog); in btf_prepare_func_args()
/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 Dstream.c334 static __noinline void subprog(void) in subprog() function
353 subprog(); in stream_arena_subprog_fault()
H A Dpro_epilogue.c17 static __noinline __used int subprog(struct st_ops_args *args) in subprog() function
H A Dexceptions.c172 __noinline static int subprog(struct __sk_buff *ctx) in subprog() function
201 return subprog(ctx); in exception_throw_subprog()
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dcore_reloc_raw.c110 struct bpf_insn subprog[] = { in test_early_core_relo() local
144 prog_fd = load_core_relo_insns(btf_fd, subprog, ARRAY_SIZE(subprog), funcs, 2, in test_early_core_relo()
/linux/include/linux/
H A Dbpf_verifier.h1052 static inline struct bpf_func_info_aux *subprog_aux(struct bpf_verifier_env *env, int subprog) in subprog_aux() argument
1054 return &env->prog->aux->func_info_aux[subprog]; in subprog_aux()
1057 static inline struct bpf_subprog_info *subprog_info(struct bpf_verifier_env *env, int subprog) in subprog_info() argument
1059 return &env->subprog_info[subprog]; in subprog_info()
1504 const char *bpf_subprog_name(const struct bpf_verifier_env *env, int subprog);
1508 bool bpf_subprog_is_global(const struct bpf_verifier_env *env, int subprog);
1717 void bpf_mark_subprog_exc_cb(struct bpf_verifier_env *env, int subprog);
H A Dbpf.h1870 * The subprog can access its first linfo by
1878 * The subprog can access its first jited_linfo by
1884 /* subprog can use linfo_idx to access its first linfo and
3202 int btf_prepare_func_args(struct bpf_verifier_env *env, int subprog); in unprivileged_ebpf_enabled()
/linux/tools/lib/bpf/
H A Dlibbpf.c6738 static int append_subprog_relos(struct bpf_program *main_prog, struct bpf_program *subprog) in append_subprog_relos() argument
6740 int new_cnt = main_prog->nr_reloc + subprog->nr_reloc; in append_subprog_relos()
6744 if (main_prog == subprog) in append_subprog_relos()
6753 if (subprog->nr_reloc) in append_subprog_relos()
6754 memcpy(relos + main_prog->nr_reloc, subprog->reloc_desc, in append_subprog_relos()
6755 sizeof(*relos) * subprog->nr_reloc); in append_subprog_relos()
6758 relos[i].insn_idx += subprog->sub_insn_off; in append_subprog_relos()
6767 static int save_subprog_offsets(struct bpf_program *main_prog, struct bpf_program *subprog) in save_subprog_offsets() argument
6778 main_prog->subprogs[cnt].sec_insn_off = subprog->sec_insn_off; in save_subprog_offsets()
6779 main_prog->subprogs[cnt].sub_insn_off = subprog->sub_insn_off; in save_subprog_offsets()
[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.c10338 struct bpf_prog *subprog = prog->aux->func[i]; in perf_event_bpf_output()
10342 (u64)(unsigned long)subprog->bpf_func, in perf_event_bpf_output()
10343 subprog->jited_len, unregister, in perf_event_bpf_output()
10344 subprog->aux->ksym.name); in perf_event_bpf_output()
10370 struct bpf_prog *subprog = prog->aux->func[i]; perf_event_bpf_emit_ksymbols() local