Home
last modified time | relevance | path

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

/linux/kernel/bpf/
H A Dcfg.c56 struct bpf_subprog_info *subprog; in mark_subprog_changes_pkt_data()
58 subprog = bpf_find_containing_subprog(env, off); in mark_subprog_changes_pkt_data()
59 subprog->changes_pkt_data = true;
64 struct bpf_subprog_info *subprog; in mark_subprog_might_sleep()
66 subprog = bpf_find_containing_subprog(env, off); in mark_subprog_might_sleep()
67 subprog->might_sleep = true;
72 struct bpf_subprog_info *subprog; in mark_subprog_might_throw()
74 subprog = bpf_find_containing_subprog(env, off); in mark_subprog_might_throw()
75 subprog->might_throw = true;
176 /* when we exit from subprog, w in visit_func_call_insn()
54 struct bpf_subprog_info *subprog; mark_subprog_changes_pkt_data() local
62 struct bpf_subprog_info *subprog; mark_subprog_might_sleep() local
70 struct bpf_subprog_info *subprog; mark_subprog_might_throw() local
345 struct bpf_subprog_info *subprog; create_jt() local
431 struct bpf_subprog_info *subprog; visit_abnormal_return_insn() local
[all...]
H A Dliveness.c40 * call passing a frame pointer to another subprog, widens the array to the
56 u32 callsite; /* call insn that invoked this subprog (subprog_start for depth 0) */ in instance_hash()
57 u32 depth; /* call depth (0 = entry subprog) */ in instance_hash()
58 u32 subprog; /* subprog index */ in instance_hash()
59 u32 subprog_start; /* cached env->subprog_info[subprog].start */ in instance_hash()
81 * For depth == 0 (entry subprog), @callsite is the subprog start insn. in call_instance()
82 * For depth > 0, @callsite is the call instruction index that invoked the subprog. in call_instance()
106 u32 callsite, int subprog) in lookup_instance()
28 u32 subprog; /* subprog index */ global() member
76 call_instance(struct bpf_verifier_env * env,struct func_instance * caller,u32 callsite,int subprog) call_instance() argument
310 struct bpf_subprog_info *subprog; update_instance() local
407 fmt_subprog(struct bpf_verifier_env * env,int subprog) fmt_subprog() argument
1518 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
1613 int subprog = instance->subprog; compute_subprog_args() local
1846 int subprog = instance->subprog; analyze_subprog() local
[all...]
H A Dfixups.c159 int start = idx + insn->imm + 1, subprog; in set_kfunc_desc_imm()
161 subprog = bpf_find_subprog(env, start); in set_kfunc_desc_imm()
162 if (verifier_bug_if(subprog < 0, env, "get stack depth: no program at insn %d", start)) in set_kfunc_desc_imm()
164 return env->subprog_info[subprog].stack_depth; in set_kfunc_desc_imm()
257 /* NOTE: fake 'exit' subprog should be updated as well. */ in adjust_insn_aux_data()
369 /* subprog that started at the old position starts with the patch */ in adjust_jmp_off()
457 /* move fake 'exit' subprog as well */ in bpf_adj_linfo_after_remove()
490 /* update fake 'exit' subprog as well */ in bpf_adj_linfo_after_remove()
1281 /* restore the start of fake 'exit' subprog as well */ in jit_subprogs()
1296 int i, err, subprog; in jit_subprogs()
208 int start = idx + insn->imm + 1, subprog; get_callee_stack_depth() local
1094 int i, j, subprog_start, subprog_end = 0, len, subprog; jit_subprogs() local
1440 struct bpf_subprog_info *subprog = &env->subprog_info[i]; bpf_fixup_call_args() local
2661 struct bpf_subprog_info *subprog = env->subprog_info; bpf_remove_fastcall_spills_fills() local
[all...]
H A Dverifier.c404 bool bpf_subprog_is_global(const struct bpf_verifier_env *env, int subprog) in subprog_returns_void()
408 return aux && aux[subprog].linkage == BTF_FUNC_GLOBAL; in subprog_returns_void()
411 static const struct btf_type *subprog_ret_type(struct bpf_verifier_env *env, int subprog) in subprog_returns_void()
420 btf_id = env->prog->aux->func_info[subprog].type_id; in bpf_subprog_name() argument
429 static bool subprog_returns_void(struct bpf_verifier_env *env, int subprog) in bpf_subprog_name()
431 const struct btf_type *type = subprog_ret_type(env, subprog); in bpf_mark_subprog_exc_cb() argument
448 int subprog; in reg_may_point_to_spin_lock()
457 * have a real prototype for subprog 0, but btf_check_func_type_match() in is_acquire_function()
460 for (subprog = 1; subprog < en in is_acquire_function()
390 bpf_subprog_is_global(const struct bpf_verifier_env * env,int subprog) bpf_subprog_is_global() argument
397 subprog_returns_void(struct bpf_verifier_env * env,int subprog) subprog_returns_void() argument
440 subprog_is_exc_cb(struct bpf_verifier_env * env,int subprog) subprog_is_exc_cb() argument
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
17848 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
17940 struct bpf_subprog_info *subprog = env->subprog_info; mark_fastcall_patterns() local
19491 do_check_common(struct bpf_verifier_env * env,int subprog,bool is_sleepable) do_check_common() argument
20122 int ret = 0, subprog = -1, i; bpf_check_attach_target() local
[all...]
H A Dconst_fold.c20 CONST_ARG_SUBPROG, /* register holds a subprog pointer, val is subprog number */
149 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()
253 /* Subprogram entries (including main at subprog 0): all registers unknown */ in bpf_compute_const_regs()
H A Dbacktrack.c169 verifier_bug(bt->env, "subprog enter from frame %d", bt->frame); in bt_clear_frame_reg()
179 verifier_bug(bt->env, "subprog exit from frame 0"); in bt_clear_reg()
428 int subprog_insn_idx, subprog = -1; in backtrack_insn()
432 subprog = bpf_find_subprog(env, subprog_insn_idx); in backtrack_insn()
433 if (subprog < 0) in backtrack_insn()
438 if (subprog >= 0 && bpf_subprog_is_global(env, subprog)) { in backtrack_insn()
440 * extra instructions from subprog; the next in backtrack_insn()
441 * instruction after call to global subprog in backtrack_insn()
446 "extra insn from subprog"); in backtrack_insn()
410 int subprog_insn_idx, subprog; backtrack_insn() local
[all...]
H A Ddiagnostics.c803 const struct bpf_subprog_info *subprog; in bpf_diag_source()
838 subprog = bpf_find_containing_subprog(env, insn_idx); in bpf_diag_source()
839 subprogno = subprog ? subprog - env->subprog_info : -ENOENT; in bpf_diag_source()
856 linfo_start = subprog ? subprog->linfo_idx : 0; in bpf_diag_source()
806 const struct bpf_subprog_info *subprog; bpf_diag_source() local
H A Dbtf.c8744 const struct btf_type *t, int subprog, bool is_global) in btf_get_module_btf()
8753 if (subprog && btf_type_is_arena_ptr(btf, t)) in check_btf_kconfigs()
8773 bool local_func = subprog && !is_global; in BPF_CALL_4()
8776 if (subprog) in BPF_CALL_4()
8811 * is cached in subprog info for reuse. in BTF_ID_LIST_GLOBAL()
8817 int btf_prepare_func_args(struct bpf_verifier_env *env, int subprog) in BTF_ID_LIST_GLOBAL()
8819 bool is_global = subprog_aux(env, subprog)->linkage == BTF_FUNC_GLOBAL; in BTF_ID_LIST_GLOBAL()
8820 struct bpf_subprog_info *sub = subprog_info(env, subprog); in BTF_ID_LIST_GLOBAL()
8839 btf_id = prog->aux->func_info[subprog].type_id; in btf_check_iter_kfuncs()
8853 subprog); in btf_check_iter_kfuncs()
8020 btf_validate_return_type(struct bpf_verifier_env * env,struct btf * btf,const struct btf_type * t,int subprog) btf_validate_return_type() argument
8054 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 Dstream.c382 static __noinline void subprog(void) in stream_arena_callback_fault()
401 subprog();
334 static __noinline void subprog(void) subprog() function
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.h380 /* subprog number == index within subprog_info
381 * zero == main subprog
847 * const_reg_subprog_mask: subprog pointers, val is subprog number.
925 * A pointer to a static subprog in the value of a frozen read-only array map:
927 * the subprog in the program.
932 u32 orig_off; /* what the map has: the first instruction of the subprog */
936 /* the subprog that a bpf_func_ptr pointed to was removed as dead code */
1124 /* subprog indices sorted in topological order: leaves first, callers last */ in mark_force_checkpoint()
1232 static inline struct bpf_func_info_aux *subprog_aux(struct bpf_verifier_env *env, int subprog)
1052 subprog_aux(struct bpf_verifier_env * env,int subprog) subprog_aux() argument
1057 subprog_info(struct bpf_verifier_env * env,int subprog) subprog_info() argument
[all...]
H A Dbpf.h1979 * The subprog can access its first linfo by
1987 * The subprog can access its first jited_linfo by
1993 /* subprog can use linfo_idx to access its first linfo and
3391 int btf_prepare_func_args(struct bpf_verifier_env *env, int subprog); in bpf_link_put()
/linux/tools/lib/bpf/
H A Dlibbpf.c4786 /* loading subprog addresses */ in bpf_program__record_reloc()
4792 pr_warn("prog '%s': bad subprog addr relo against '%s' at offset %zu+%d\n", in bpf_program__record_reloc()
6275 /* When __weak subprog is "overridden" by another instance in poison_map_ldimm64()
6276 * of the subprog from a different object file, linker still in poison_map_ldimm64()
6281 * subprog instructions when discovering subprograms. in poison_map_ldimm64()
7001 static int append_subprog_relos(struct bpf_program *main_prog, struct bpf_program *subprog)
7003 int new_cnt = main_prog->nr_reloc + subprog->nr_reloc;
7007 if (main_prog == subprog)
7016 if (subprog->nr_reloc) in bpf_object__relocate_calls()
7017 memcpy(relos + main_prog->nr_reloc, subprog in bpf_object__relocate_calls()
6738 append_subprog_relos(struct bpf_program * main_prog,struct bpf_program * subprog) append_subprog_relos() argument
6767 save_subprog_offsets(struct bpf_program * main_prog,struct bpf_program * subprog) save_subprog_offsets() argument
6787 bpf_object__append_subprog_code(struct bpf_object * obj,struct bpf_program * main_prog,struct bpf_program * subprog) bpf_object__append_subprog_code() argument
6830 struct bpf_program *subprog; bpf_object__reloc_code() local
7018 struct bpf_program *subprog; bpf_object__relocate_calls() local
7129 struct bpf_program *subprog = &obj->programs[j]; bpf_prog_assign_exc_cb() local
7555 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.c10499 struct bpf_prog *subprog = prog->aux->func[i];
10503 (u64)(unsigned long)subprog->bpf_func,
10504 subprog->jited_len, unregister,
10505 subprog->aux->ksym.name);
10456 struct bpf_prog *subprog = prog->aux->func[i]; perf_event_bpf_emit_ksymbols() local