Home
last modified time | relevance | path

Searched refs:bpf_verifier_env (Results 1 – 24 of 24) sorted by relevance

/linux/kernel/bpf/
H A Ddiagnostics.h15 struct bpf_verifier_env;
19 const char *bpf_diag_fmt_s64_sum(struct bpf_verifier_env *env, s64 value, int addend);
45 bool bpf_diag_enabled(const struct bpf_verifier_env *env);
46 int bpf_diag_init(struct bpf_verifier_env *env);
47 void bpf_diag_init_frame(struct bpf_verifier_env *env, struct bpf_func_state *state);
48 char *bpf_diag_fmt_buf(struct bpf_verifier_env *env, size_t size);
49 const char *bpf_diag_vfmt(struct bpf_verifier_env *env, const char *fmt, va_list args)
51 const char *bpf_diag_fmt(struct bpf_verifier_env *env, const char *fmt, ...) __printf(2, 3);
52 const char *bpf_diag_fmt_btf_type(struct bpf_verifier_env *env, const struct btf *btf, u32 type_id);
53 const char *bpf_diag_reg_type_plain(struct bpf_verifier_env *env, enum bpf_reg_type type);
[all …]
H A Ddiagnostics.c165 static void diag_print_history(struct bpf_verifier_env *env,
177 struct bpf_verifier_env *env;
225 bool bpf_diag_enabled(const struct bpf_verifier_env *env) in bpf_diag_enabled()
230 static void diag_write(struct bpf_verifier_env *env, const char *fmt, ...) __printf(2, 3);
232 int bpf_diag_init(struct bpf_verifier_env *env) in bpf_diag_init()
245 void bpf_diag_init_frame(struct bpf_verifier_env *env, struct bpf_func_state *state) in bpf_diag_init_frame()
251 static char *diag_fmt_alloc(struct bpf_verifier_env *env, size_t size) in diag_fmt_alloc()
284 char *bpf_diag_fmt_buf(struct bpf_verifier_env *env, size_t size) in bpf_diag_fmt_buf()
294 const char *bpf_diag_vfmt(struct bpf_verifier_env *env, const char *fmt, va_list args) in bpf_diag_vfmt()
312 const char *bpf_diag_fmt(struct bpf_verifier_env *env, const char *fmt, ...) in bpf_diag_fmt()
[all …]
H A Dstates.c12 static bool is_may_goto_insn_at(struct bpf_verifier_env *env, int insn_idx) in is_may_goto_insn_at()
17 static bool is_iter_next_insn(struct bpf_verifier_env *env, int insn_idx) in is_iter_next_insn()
22 static void update_peak_states(struct bpf_verifier_env *env) in update_peak_states()
41 static bool incomplete_read_marks(struct bpf_verifier_env *env,
48 static void maybe_free_verifier_state(struct bpf_verifier_env *env, in maybe_free_verifier_state()
74 static bool compute_scc_callchain(struct bpf_verifier_env *env, in compute_scc_callchain()
97 static struct bpf_scc_visit *scc_visit_lookup(struct bpf_verifier_env *env, in scc_visit_lookup()
116 static struct bpf_scc_visit *scc_visit_alloc(struct bpf_verifier_env *env, in scc_visit_alloc()
140 static char *format_callchain(struct bpf_verifier_env *env, struct bpf_scc_callchain *callchain) in format_callchain()
160 static int maybe_enter_scc(struct bpf_verifier_env *env, struct bpf_verifier_state *st) in maybe_enter_scc()
[all …]
H A Dverifier.c207 static int acquire_reference(struct bpf_verifier_env *env, int insn_idx, int parent_id);
209 static int release_reference_nomark(struct bpf_verifier_env *env, int id);
210 static int release_reference(struct bpf_verifier_env *env, int id);
211 static void invalidate_non_owning_refs(struct bpf_verifier_env *env);
212 static void invalidate_rcu_protected_refs(struct bpf_verifier_env *env);
213 static bool in_rbtree_lock_required_cb(struct bpf_verifier_env *env);
215 static int ref_set_non_owning(struct bpf_verifier_env *env,
217 static bool is_trusted_reg(struct bpf_verifier_env *env, const struct bpf_reg_state *reg);
218 static inline bool in_sleepable_context(struct bpf_verifier_env *env);
219 static const char *non_sleepable_context_description(struct bpf_verifier_env *en
[all...]
H A Dcfg.c52 static void mark_subprog_changes_pkt_data(struct bpf_verifier_env *env, int off) in mark_subprog_changes_pkt_data()
60 static void mark_subprog_might_sleep(struct bpf_verifier_env *env, int off) in mark_subprog_might_sleep()
68 static void mark_subprog_might_throw(struct bpf_verifier_env *env, int off) in mark_subprog_might_throw()
82 static void merge_callee_effects(struct bpf_verifier_env *env, int t, int w) in merge_callee_effects()
103 static int push_insn(int t, int w, int e, struct bpf_verifier_env *env) in push_insn()
162 struct bpf_verifier_env *env, in visit_func_call_insn()
290 static struct bpf_iarray *jt_from_subprog(struct bpf_verifier_env *env, in jt_from_subprog()
343 create_jt(int t, struct bpf_verifier_env *env) in create_jt()
376 static int visit_gotox_insn(int t, struct bpf_verifier_env *env) in visit_gotox_insn()
429 static int visit_abnormal_return_insn(struct bpf_verifier_env *env, int t) in visit_abnormal_return_insn()
[all …]
H A Dcheck_btf.c10 static int check_abnormal_return(struct bpf_verifier_env *env) in check_abnormal_return()
31 static int prepare_btf_func(struct bpf_verifier_env *env, in prepare_btf_func()
133 static int check_btf_func(struct bpf_verifier_env *env, in check_btf_func()
213 static int check_btf_line(struct bpf_verifier_env *env, in check_btf_line()
341 int bpf_check_core_relo(struct bpf_verifier_env *env, in bpf_check_core_relo()
410 int bpf_prepare_btf_info(struct bpf_verifier_env *env, in bpf_prepare_btf_info()
438 int bpf_check_btf_info(struct bpf_verifier_env *env, in bpf_check_btf_info()
H A Dliveness.c61 static struct func_instance *find_instance(struct bpf_verifier_env *env, in find_instance()
74 static struct func_instance *call_instance(struct bpf_verifier_env *env, in call_instance()
101 static struct func_instance *lookup_instance(struct bpf_verifier_env *env, in lookup_instance()
120 int bpf_stack_liveness_init(struct bpf_verifier_env *env) in bpf_stack_liveness_init()
129 void bpf_stack_liveness_free(struct bpf_verifier_env *env) in bpf_stack_liveness_free()
218 bpf_insn_successors(struct bpf_verifier_env *env, u32 idx) in bpf_insn_successors()
272 static inline bool update_insn(struct bpf_verifier_env *env, in update_insn()
306 static void update_instance(struct bpf_verifier_env *env, struct func_instance *instance) in update_instance()
338 int bpf_live_stack_query_init(struct bpf_verifier_env *env, struct bpf_verifier_state *st) in bpf_live_stack_query_init()
359 bool bpf_stack_slot_alive(struct bpf_verifier_env *env, u32 frameno, u32 half_spi) in bpf_stack_slot_alive()
[all …]
H A Dlog.c304 __printf(2, 3) void bpf_verifier_log_write(struct bpf_verifier_env *env, in bpf_verifier_log_write()
340 __printf(3, 4) void verbose_linfo(struct bpf_verifier_env *env, in verbose_linfo()
399 const char *reg_type_str(struct bpf_verifier_env *env, enum bpf_reg_type type) in reg_type_str()
522 static void verbose_unum(struct bpf_verifier_env *env, u64 num) in verbose_unum()
530 static void verbose_snum(struct bpf_verifier_env *env, s64 num) in verbose_snum()
553 static void print_scalar_ranges(struct bpf_verifier_env *env, in print_scalar_ranges()
624 static void print_reg_state(struct bpf_verifier_env *env, in print_reg_state()
700 void print_verifier_state(struct bpf_verifier_env *env, const struct bpf_verifier_state *vstate, in print_verifier_state()
803 void print_insn_state(struct bpf_verifier_env *env, const struct bpf_verifier_state *vstate, in print_insn_state()
H A Dfixups.c150 static int set_kfunc_desc_imm(struct bpf_verifier_env *env, struct bpf_kfunc_desc *desc) in set_kfunc_desc_imm()
169 static int sort_kfunc_descs_by_imm_off(struct bpf_verifier_env *env) in sort_kfunc_descs_by_imm_off()
189 static int add_kfunc_in_insns(struct bpf_verifier_env *env, in add_kfunc_in_insns()
205 static int get_callee_stack_depth(struct bpf_verifier_env *env, in get_callee_stack_depth()
221 static void adjust_insn_aux_data(struct bpf_verifier_env *env, in adjust_insn_aux_data()
263 static void adjust_subprog_starts(struct bpf_verifier_env *env, u32 off, u32 len) in adjust_subprog_starts()
277 static void adjust_insn_arrays(struct bpf_verifier_env *env, u32 off, u32 len) in adjust_insn_arrays()
288 static void adjust_insn_arrays_after_remove(struct bpf_verifier_env *env, u32 off, u32 len) in adjust_insn_arrays_after_remove()
323 struct bpf_prog *bpf_patch_insn_data(struct bpf_verifier_env *env, u32 off, in bpf_patch_insn_data()
396 static int adjust_subprog_starts_after_remove(struct bpf_verifier_env *env, in adjust_subprog_starts_after_remove()
[all …]
H A Dbacktrack.c11 int bpf_push_jmp_history(struct bpf_verifier_env *env, struct bpf_verifier_state *cur, in bpf_push_jmp_history()
120 struct bpf_verifier_env *env = bt->env; in bt_reset()
265 static int backtrack_insn(struct bpf_verifier_env *env, int idx, int subseq_idx, in backtrack_insn()
665 void bpf_mark_all_scalars_precise(struct bpf_verifier_env *env, in bpf_mark_all_scalars_precise()
799 int bpf_mark_chain_precision(struct bpf_verifier_env *env, in bpf_mark_chain_precision()
H A Dconst_fold.c50 static void const_reg_xfer(struct bpf_verifier_env *env, struct const_arg_info *ci_out, in const_reg_xfer()
232 int bpf_compute_const_regs(struct bpf_verifier_env *env) in bpf_compute_const_regs()
339 int bpf_prune_dead_branches(struct bpf_verifier_env *env) in bpf_prune_dead_branches()
H A Doffload.c303 int bpf_prog_offload_verify_insn(struct bpf_verifier_env *env, in bpf_prog_offload_verify_insn()
319 int bpf_prog_offload_finalize(struct bpf_verifier_env *env) in bpf_prog_offload_finalize()
338 bpf_prog_offload_replace_insn(struct bpf_verifier_env *env, u32 off, in bpf_prog_offload_replace_insn()
357 bpf_prog_offload_remove_insns(struct bpf_verifier_env *env, u32 off, u32 cnt) in bpf_prog_offload_remove_insns()
H A Dcore.c1567 struct bpf_prog *bpf_jit_blind_constants(struct bpf_verifier_env *env, struct bpf_prog *prog) in bpf_jit_blind_constants()
1650 bool bpf_insn_is_indirect_target(const struct bpf_verifier_env *env, const struct bpf_prog *prog, in bpf_insn_is_indirect_target()
1659 u16 bpf_out_stack_arg_cnt(const struct bpf_verifier_env *env, const struct bpf_prog *prog) in bpf_out_stack_arg_cnt()
2637 static struct bpf_prog *bpf_prog_jit_compile(struct bpf_verifier_env *env, struct bpf_prog *prog) in bpf_prog_jit_compile()
2671 struct bpf_prog *__bpf_prog_select_runtime(struct bpf_verifier_env *env, struct bpf_prog *fp, in __bpf_prog_select_runtime()
3232 struct bpf_prog * __weak bpf_int_jit_compile(struct bpf_verifier_env *env, struct bpf_prog *prog)
H A Dbtf.c7922 static int btf_scan_decl_tags(struct bpf_verifier_env *env, in btf_scan_decl_tags()
7984 static int btf_scan_type_tags(struct bpf_verifier_env *env, in btf_scan_type_tags()
8019 static int btf_validate_return_type(struct bpf_verifier_env *env, struct btf *btf, in btf_validate_return_type()
8054 int btf_prepare_func_args(struct bpf_verifier_env *env, int subprog) in btf_prepare_func_args()
/linux/include/linux/
H A Dbpf_verifier.h846 struct bpf_verifier_env;
849 struct bpf_verifier_env *env;
920 struct bpf_verifier_env { struct
1052 static inline struct bpf_func_info_aux *subprog_aux(struct bpf_verifier_env *env, int subprog) in subprog_aux() argument
1057 static inline struct bpf_subprog_info *subprog_info(struct bpf_verifier_env *env, int subprog) in subprog_info()
1088 __printf(2, 3) void bpf_verifier_log_write(struct bpf_verifier_env *env,
1097 __printf(3, 4) void verbose_linfo(struct bpf_verifier_env *env,
1114 static inline void mark_prune_point(struct bpf_verifier_env *env, int idx) in mark_prune_point()
1119 static inline bool bpf_is_prune_point(struct bpf_verifier_env *env, int insn_idx) in bpf_is_prune_point()
1124 static inline void mark_force_checkpoint(struct bpf_verifier_env *env, int idx) in mark_force_checkpoint()
[all …]
H A Dfilter.h1189 struct bpf_prog *__bpf_prog_select_runtime(struct bpf_verifier_env *env, struct bpf_prog *fp,
1233 struct bpf_prog *bpf_int_jit_compile(struct bpf_verifier_env *env, struct bpf_prog *prog);
1268 struct bpf_prog *bpf_patch_insn_data(struct bpf_verifier_env *env, u32 off,
1271 static inline struct bpf_prog *bpf_patch_insn_data(struct bpf_verifier_env *env, u32 off, in bpf_patch_insn_data()
1414 struct bpf_prog *bpf_jit_blind_constants(struct bpf_verifier_env *env, struct bpf_prog *prog);
1566 struct bpf_prog *bpf_jit_blind_constants(struct bpf_verifier_env *env, struct bpf_prog *prog) in bpf_jit_blind_constants()
H A Dbpf.h40 struct bpf_verifier_env;
178 int (*map_set_for_each_callback_args)(struct bpf_verifier_env *env,
1172 int (*insn_hook)(struct bpf_verifier_env *env,
1174 int (*finalize)(struct bpf_verifier_env *env);
1176 int (*replace_insn)(struct bpf_verifier_env *env, u32 off,
1178 int (*remove_insns)(struct bpf_verifier_env *env, u32 off, u32 cnt);
1638 bool bpf_insn_is_indirect_target(const struct bpf_verifier_env *env, const struct bpf_prog *prog, in bpf_prog_has_trampoline()
1640 u16 bpf_out_stack_arg_cnt(const struct bpf_verifier_env *env, const struct bpf_prog *prog); in bpf_trampoline_multi_attach()
3065 int map_set_for_each_callback_args(struct bpf_verifier_env *env,
3202 int btf_prepare_func_args(struct bpf_verifier_env *en
[all...]
/linux/drivers/net/ethernet/netronome/nfp/bpf/
H A Dmain.h566 int nfp_verify_insn(struct bpf_verifier_env *env, int insn_idx,
568 int nfp_bpf_finalize(struct bpf_verifier_env *env);
570 int nfp_bpf_opt_replace_insn(struct bpf_verifier_env *env, u32 off,
572 int nfp_bpf_opt_remove_insns(struct bpf_verifier_env *env, u32 off, u32 cnt);
/linux/arch/riscv/net/
H A Dbpf_jit_core.c44 struct bpf_prog *bpf_int_jit_compile(struct bpf_verifier_env *env, struct bpf_prog *prog) in bpf_int_jit_compile()
/linux/tools/testing/selftests/bpf/progs/
H A Dverifier_global_ptr_args.c261 subprog_untrusted((void *)bpf_core_cast(0, struct bpf_verifier_env)); in anything_to_untrusted()
/linux/arch/arm64/net/
H A Dbpf_jit_comp.c1304 static int build_insn(const struct bpf_verifier_env *env, const struct bpf_insn *insn, in build_insn()
2056 static int build_body(struct bpf_verifier_env *env, struct jit_ctx *ctx, bool extra_pass) in build_body()
2158 struct bpf_prog *bpf_int_jit_compile(struct bpf_verifier_env *env, struct bpf_prog *prog) in bpf_int_jit_compile()
/linux/arch/powerpc/net/
H A Dbpf_jit_comp.c165 struct bpf_prog *bpf_int_jit_compile(struct bpf_verifier_env *env, struct bpf_prog *fp) in bpf_int_jit_compile()
/linux/arch/x86/net/
H A Dbpf_jit_comp.c1730 static int do_jit(struct bpf_verifier_env *env, struct bpf_prog *bpf_prog, int *addrs, u8 *image, in do_jit()
3970 struct bpf_prog *bpf_int_jit_compile(struct bpf_verifier_env *env, struct bpf_prog *prog) in bpf_int_jit_compile()
/linux/arch/loongarch/net/
H A Dbpf_jit.c2211 struct bpf_prog *bpf_int_jit_compile(struct bpf_verifier_env *env, struct bpf_prog *prog) in bpf_int_jit_compile()