Home
last modified time | relevance | path

Searched refs:bpf_verifier_env (Results 1 – 23 of 23) 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 *env);
[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()
161 struct bpf_verifier_env *env, in visit_func_call_insn()
289 static struct bpf_iarray *jt_from_subprog(struct bpf_verifier_env *env, in jt_from_subprog()
342 create_jt(int t, struct bpf_verifier_env *env) in create_jt()
375 static int visit_gotox_insn(int t, struct bpf_verifier_env *env) in visit_gotox_insn()
427 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 static int check_core_relo(struct bpf_verifier_env *env, in 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.c144 static int set_kfunc_desc_imm(struct bpf_verifier_env *env, struct bpf_kfunc_desc *desc) in set_kfunc_desc_imm()
163 static int sort_kfunc_descs_by_imm_off(struct bpf_verifier_env *env) in sort_kfunc_descs_by_imm_off()
183 static int add_kfunc_in_insns(struct bpf_verifier_env *env, in add_kfunc_in_insns()
199 static int get_callee_stack_depth(struct bpf_verifier_env *env, in get_callee_stack_depth()
215 static void adjust_insn_aux_data(struct bpf_verifier_env *env, in adjust_insn_aux_data()
257 static void adjust_subprog_starts(struct bpf_verifier_env *env, u32 off, u32 len) in adjust_subprog_starts()
271 static void adjust_insn_arrays(struct bpf_verifier_env *env, u32 off, u32 len) in adjust_insn_arrays()
282 static void adjust_insn_arrays_after_remove(struct bpf_verifier_env *env, u32 off, u32 len) in adjust_insn_arrays_after_remove()
304 struct bpf_prog *bpf_patch_insn_data(struct bpf_verifier_env *env, u32 off, in bpf_patch_insn_data()
374 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()
655 void bpf_mark_all_scalars_precise(struct bpf_verifier_env *env, in bpf_mark_all_scalars_precise()
789 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 Dcore.c1567 struct bpf_prog *bpf_jit_blind_constants(struct bpf_verifier_env *env, struct bpf_prog *prog) in bpf_jit_blind_constants()
1646 bool bpf_insn_is_indirect_target(const struct bpf_verifier_env *env, const struct bpf_prog *prog, in bpf_insn_is_indirect_target()
1655 u16 bpf_out_stack_arg_cnt(const struct bpf_verifier_env *env, const struct bpf_prog *prog) in bpf_out_stack_arg_cnt()
2633 static struct bpf_prog *bpf_prog_jit_compile(struct bpf_verifier_env *env, struct bpf_prog *prog) in bpf_prog_jit_compile()
2664 struct bpf_prog *__bpf_prog_select_runtime(struct bpf_verifier_env *env, struct bpf_prog *fp, in __bpf_prog_select_runtime()
3218 struct bpf_prog * __weak bpf_int_jit_compile(struct bpf_verifier_env *env, struct bpf_prog *prog) in bpf_int_jit_compile()
H A Dbtf.c7862 static int btf_scan_decl_tags(struct bpf_verifier_env *env, in btf_scan_decl_tags()
7924 static int btf_scan_type_tags(struct bpf_verifier_env *env, in btf_scan_type_tags()
7959 static int btf_validate_return_type(struct bpf_verifier_env *env, struct btf *btf, in btf_validate_return_type()
7994 int btf_prepare_func_args(struct bpf_verifier_env *env, int subprog) in btf_prepare_func_args()
/linux/include/linux/
H A Dbpf_verifier.h842 struct bpf_verifier_env;
845 struct bpf_verifier_env *env;
916 struct bpf_verifier_env { struct
1048 static inline struct bpf_func_info_aux *subprog_aux(struct bpf_verifier_env *env, int subprog) in subprog_aux() argument
1053 static inline struct bpf_subprog_info *subprog_info(struct bpf_verifier_env *env, int subprog) in subprog_info()
1084 __printf(2, 3) void bpf_verifier_log_write(struct bpf_verifier_env *env,
1093 __printf(3, 4) void verbose_linfo(struct bpf_verifier_env *env,
1110 static inline void mark_prune_point(struct bpf_verifier_env *env, int idx) in mark_prune_point()
1115 static inline bool bpf_is_prune_point(struct bpf_verifier_env *env, int insn_idx) in bpf_is_prune_point()
1120 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()
1415 struct bpf_prog *bpf_jit_blind_constants(struct bpf_verifier_env *env, struct bpf_prog *prog);
1567 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,
1171 int (*insn_hook)(struct bpf_verifier_env *env,
1173 int (*finalize)(struct bpf_verifier_env *env);
1175 int (*replace_insn)(struct bpf_verifier_env *env, u32 off,
1177 int (*remove_insns)(struct bpf_verifier_env *env, u32 off, u32 cnt);
1601 bool bpf_insn_is_indirect_target(const struct bpf_verifier_env *env, const struct bpf_prog *prog,
1603 u16 bpf_out_stack_arg_cnt(const struct bpf_verifier_env *env, const struct bpf_prog *prog);
3026 int map_set_for_each_callback_args(struct bpf_verifier_env *env,
3163 int btf_prepare_func_args(struct bpf_verifier_env *env, int subprog);
/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/tools/testing/selftests/bpf/progs/
H A Dverifier_global_ptr_args.c237 subprog_untrusted((void *)bpf_core_cast(0, struct bpf_verifier_env)); in anything_to_untrusted()
/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/arch/arm64/net/
H A Dbpf_jit_comp.c1302 static int build_insn(const struct bpf_verifier_env *env, const struct bpf_insn *insn, in build_insn()
2054 static int build_body(struct bpf_verifier_env *env, struct jit_ctx *ctx, bool extra_pass) in build_body()
2156 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.c1729 static int do_jit(struct bpf_verifier_env *env, struct bpf_prog *bpf_prog, int *addrs, u8 *image, in do_jit()
3962 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.c2191 struct bpf_prog *bpf_int_jit_compile(struct bpf_verifier_env *env, struct bpf_prog *prog) in bpf_int_jit_compile()