H A D | verifier.c | 200 static int acquire_reference_state(struct bpf_verifier_env *env, int insn_idx); 201 static int release_reference(struct bpf_verifier_env *env, int ref_obj_id); 202 static void invalidate_non_owning_refs(struct bpf_verifier_env *env); 203 static bool in_rbtree_lock_required_cb(struct bpf_verifier_env *env); 204 static int ref_set_non_owning(struct bpf_verifier_env *env, 206 static void specialize_kfunc(struct bpf_verifier_env *env, 354 struct bpf_verifier_env *env = private_data; local 357 if (!bpf_verifier_log_needed(&env->log)) 361 bpf_verifier_vlog(&env->log, fmt, args); 365 static void verbose_invalid_scalar(struct bpf_verifier_env *env, argument 424 subprog_is_global(const struct bpf_verifier_env *env, int subprog) argument 431 subprog_name(const struct bpf_verifier_env *env, int subprog) argument 442 mark_subprog_exc_cb(struct bpf_verifier_env *env, int subprog) argument 451 subprog_is_exc_cb(struct bpf_verifier_env *env, int subprog) argument 541 is_may_goto_insn_at(struct bpf_verifier_env *env, int insn_idx) argument 581 func(struct bpf_verifier_env *env, const struct bpf_reg_state *reg) argument 603 stack_slot_obj_get_spi(struct bpf_verifier_env *env, struct bpf_reg_state *reg, const char *obj_kind, int nr_slots) argument 630 dynptr_get_spi(struct bpf_verifier_env *env, struct bpf_reg_state *reg) argument 635 iter_get_spi(struct bpf_verifier_env *env, struct bpf_reg_state *reg, int nr_slots) argument 684 mark_dynptr_stack_regs(struct bpf_verifier_env *env, struct bpf_reg_state *sreg1, struct bpf_reg_state *sreg2, enum bpf_dynptr_type type) argument 695 mark_dynptr_cb_reg(struct bpf_verifier_env *env, struct bpf_reg_state *reg, enum bpf_dynptr_type type) argument 705 mark_stack_slots_dynptr(struct bpf_verifier_env *env, struct bpf_reg_state *reg, enum bpf_arg_type arg_type, int insn_idx, int clone_ref_obj_id) argument 766 invalidate_dynptr(struct bpf_verifier_env *env, struct bpf_func_state *state, int spi) argument 803 unmark_stack_slots_dynptr(struct bpf_verifier_env *env, struct bpf_reg_state *reg) argument 852 mark_reg_invalid(const struct bpf_verifier_env *env, struct bpf_reg_state *reg) argument 860 destroy_if_dynptr_stack_slot(struct bpf_verifier_env *env, struct bpf_func_state *state, int spi) argument 916 is_dynptr_reg_valid_uninit(struct bpf_verifier_env *env, struct bpf_reg_state *reg) argument 944 is_dynptr_reg_valid_init(struct bpf_verifier_env *env, struct bpf_reg_state *reg) argument 973 is_dynptr_type_expected(struct bpf_verifier_env *env, struct bpf_reg_state *reg, enum bpf_arg_type arg_type) argument 1001 mark_stack_slots_iter(struct bpf_verifier_env *env, struct bpf_kfunc_call_arg_meta *meta, struct bpf_reg_state *reg, int insn_idx, struct btf *btf, u32 btf_id, int nr_slots) argument 1045 unmark_stack_slots_iter(struct bpf_verifier_env *env, struct bpf_reg_state *reg, int nr_slots) argument 1076 is_iter_reg_valid_uninit(struct bpf_verifier_env *env, struct bpf_reg_state *reg, int nr_slots) argument 1103 is_iter_reg_valid_init(struct bpf_verifier_env *env, struct bpf_reg_state *reg, struct btf *btf, u32 btf_id, int nr_slots) argument 1185 mark_stack_slot_misc(struct bpf_verifier_env *env, u8 *stype) argument 1297 grow_stack_state(struct bpf_verifier_env *env, struct bpf_func_state *state, int size) argument 1326 acquire_reference_state(struct bpf_verifier_env *env, int insn_idx) argument 1458 state_htab_size(struct bpf_verifier_env *env) argument 1463 explored_state(struct bpf_verifier_env *env, int idx) argument 1642 update_branch_counts(struct bpf_verifier_env *env, struct bpf_verifier_state *st) argument 1667 pop_stack(struct bpf_verifier_env *env, int *prev_insn_idx, int *insn_idx, bool pop_log) argument 1696 push_stack(struct bpf_verifier_env *env, int insn_idx, int prev_insn_idx, bool speculative) argument 1794 __mark_reg_const_zero(const struct bpf_verifier_env *env, struct bpf_reg_state *reg) argument 1804 mark_reg_known_zero(struct bpf_verifier_env *env, struct bpf_reg_state *regs, u32 regno) argument 2214 reg_bounds_sanity_check(struct bpf_verifier_env *env, struct bpf_reg_state *reg, const char *ctx) argument 2308 __mark_reg_unknown(const struct bpf_verifier_env *env, struct bpf_reg_state *reg) argument 2315 mark_reg_unknown(struct bpf_verifier_env *env, struct bpf_reg_state *regs, u32 regno) argument 2328 __mark_reg_not_init(const struct bpf_verifier_env *env, struct bpf_reg_state *reg) argument 2335 mark_reg_not_init(struct bpf_verifier_env *env, struct bpf_reg_state *regs, u32 regno) argument 2348 mark_btf_ld_reg(struct bpf_verifier_env *env, struct bpf_reg_state *regs, u32 regno, enum bpf_reg_type reg_type, struct btf *btf, u32 btf_id, enum bpf_type_flag flag) argument 2365 init_reg_state(struct bpf_verifier_env *env, struct bpf_func_state *state) argument 2390 init_func_state(struct bpf_verifier_env *env, struct bpf_func_state *state, int callsite, int frameno, int subprogno) argument 2403 push_async_cb(struct bpf_verifier_env *env, int insn_idx, int prev_insn_idx, int subprog) argument 2462 find_subprog(struct bpf_verifier_env *env, int off) argument 2474 add_subprog(struct bpf_verifier_env *env, int off) argument 2497 bpf_find_exception_callback_insn_off(struct bpf_verifier_env *env) argument 2635 __find_kfunc_desc_btf(struct bpf_verifier_env *env, s16 offset) argument 2705 find_kfunc_desc_btf(struct bpf_verifier_env *env, s16 offset) argument 2721 add_kfunc_call(struct bpf_verifier_env *env, u32 func_id, s16 offset) argument 2895 add_subprog_and_kfunc(struct bpf_verifier_env *env) argument 2958 check_subprogs(struct bpf_verifier_env *env) argument 3014 mark_reg_read(struct bpf_verifier_env *env, const struct bpf_reg_state *state, struct bpf_reg_state *parent, u8 flag) argument 3062 mark_dynptr_read(struct bpf_verifier_env *env, struct bpf_reg_state *reg) argument 3088 mark_iter_read(struct bpf_verifier_env *env, struct bpf_reg_state *reg, int spi, int nr_slots) argument 3111 is_reg64(struct bpf_verifier_env *env, struct bpf_insn *insn, u32 regno, struct bpf_reg_state *reg, enum reg_arg_type t) argument 3221 insn_has_def32(struct bpf_verifier_env *env, struct bpf_insn *insn) argument 3231 mark_insn_zext(struct bpf_verifier_env *env, struct bpf_reg_state *reg) argument 3244 __check_reg_arg(struct bpf_verifier_env *env, struct bpf_reg_state *regs, u32 regno, enum reg_arg_type t) argument 3289 check_reg_arg(struct bpf_verifier_env *env, u32 regno, enum reg_arg_type t) argument 3313 mark_jmp_point(struct bpf_verifier_env *env, int idx) argument 3318 is_jmp_point(struct bpf_verifier_env *env, int insn_idx) argument 3324 push_jmp_history(struct bpf_verifier_env *env, struct bpf_verifier_state *cur, int insn_flags) argument 3426 struct bpf_verifier_env *env = bt->env; local 3575 backtrack_insn(struct bpf_verifier_env *env, int idx, int subseq_idx, struct bpf_jmp_history_entry *hist, struct backtrack_state *bt) argument 3903 mark_all_scalars_precise(struct bpf_verifier_env *env, struct bpf_verifier_state *st) argument 3950 mark_all_scalars_imprecise(struct bpf_verifier_env *env, struct bpf_verifier_state *st) argument 4002 mark_precise_scalar_ids(struct bpf_verifier_env *env, struct bpf_verifier_state *st) argument 4152 __mark_chain_precision(struct bpf_verifier_env *env, int regno) argument 4356 mark_chain_precision(struct bpf_verifier_env *env, int regno) argument 4364 mark_chain_precision_batch(struct bpf_verifier_env *env) argument 4424 assign_scalar_id_before_mov(struct bpf_verifier_env *env, struct bpf_reg_state *src_reg) argument 4447 save_register_state(struct bpf_verifier_env *env, struct bpf_func_state *state, int spi, struct bpf_reg_state *reg, int size) argument 4479 check_stack_write_fixed_off(struct bpf_verifier_env *env, struct bpf_func_state *state, int off, int size, int value_regno, int insn_idx) argument 4621 check_stack_write_var_off(struct bpf_verifier_env *env, struct bpf_func_state *state, int ptr_regno, int off, int size, int value_regno, int insn_idx) argument 4738 mark_reg_stack_read(struct bpf_verifier_env *env, struct bpf_func_state *ptr_state, int min_off, int max_off, int dst_regno) argument 4779 check_stack_read_fixed_off(struct bpf_verifier_env *env, struct bpf_func_state *reg_state, int off, int size, int dst_regno) argument 4918 reg_state(struct bpf_verifier_env *env, int regno) argument 4936 check_stack_read_var_off(struct bpf_verifier_env *env, int ptr_regno, int off, int size, int dst_regno) argument 4967 check_stack_read(struct bpf_verifier_env *env, int ptr_regno, int off, int size, int dst_regno) argument 5024 check_stack_write(struct bpf_verifier_env *env, int ptr_regno, int off, int size, int value_regno, int insn_idx) argument 5047 check_map_access_type(struct bpf_verifier_env *env, u32 regno, int off, int size, enum bpf_access_type type) argument 5070 __check_mem_access(struct bpf_verifier_env *env, int regno, int off, int size, u32 mem_size, bool zero_size_allowed) argument 5106 check_mem_region_access(struct bpf_verifier_env *env, u32 regno, int off, int size, u32 mem_size, bool zero_size_allowed) argument 5161 __check_ptr_off_reg(struct bpf_verifier_env *env, const struct bpf_reg_state *reg, int regno, bool fixed_off_ok) argument 5193 check_ptr_off_reg(struct bpf_verifier_env *env, const struct bpf_reg_state *reg, int regno) argument 5199 map_kptr_match_type(struct bpf_verifier_env *env, struct btf_field *kptr_field, struct bpf_reg_state *reg, u32 regno) argument 5275 in_sleepable(struct bpf_verifier_env *env) argument 5283 in_rcu_cs(struct bpf_verifier_env *env) argument 5330 btf_ld_kptr_type(struct bpf_verifier_env *env, struct btf_field *kptr_field) argument 5353 check_map_kptr_access(struct bpf_verifier_env *env, u32 regno, int value_regno, int insn_idx, struct btf_field *kptr_field) argument 5410 check_map_access(struct bpf_verifier_env *env, u32 regno, int off, int size, bool zero_size_allowed, enum bpf_access_src src) argument 5473 may_access_direct_pkt_data(struct bpf_verifier_env *env, const struct bpf_call_arg_meta *meta, enum bpf_access_type t) argument 5515 check_packet_access(struct bpf_verifier_env *env, u32 regno, int off, int size, bool zero_size_allowed) argument 5558 check_ctx_access(struct bpf_verifier_env *env, int insn_idx, int off, int size, enum bpf_access_type t, enum bpf_reg_type *reg_type, struct btf **btf, u32 *btf_id) argument 5594 check_flow_keys_access(struct bpf_verifier_env *env, int off, int size) argument 5606 check_sock_access(struct bpf_verifier_env *env, int insn_idx, u32 regno, int off, int size, enum bpf_access_type t) argument 5651 is_pointer_value(struct bpf_verifier_env *env, int regno) argument 5656 is_ctx_reg(struct bpf_verifier_env *env, int regno) argument 5663 is_sk_reg(struct bpf_verifier_env *env, int regno) argument 5670 is_pkt_reg(struct bpf_verifier_env *env, int regno) argument 5677 is_flow_key_reg(struct bpf_verifier_env *env, int regno) argument 5685 is_arena_reg(struct bpf_verifier_env *env, int regno) argument 5734 check_pkt_ptr_alignment(struct bpf_verifier_env *env, const struct bpf_reg_state *reg, int off, int size, bool strict) argument 5769 check_generic_ptr_alignment(struct bpf_verifier_env *env, const struct bpf_reg_state *reg, const char *pointer_desc, int off, int size, bool strict) argument 5793 check_ptr_alignment(struct bpf_verifier_env *env, const struct bpf_reg_state *reg, int off, int size, bool strict_alignment_once) argument 5848 round_up_stack_depth(struct bpf_verifier_env *env, int stack_depth) argument 5865 check_max_stack_depth_subprog(struct bpf_verifier_env *env, int idx) argument 6003 check_max_stack_depth(struct bpf_verifier_env *env) argument 6020 get_callee_stack_depth(struct bpf_verifier_env *env, const struct bpf_insn *insn, int idx) argument 6035 __check_buffer_access(struct bpf_verifier_env *env, const char *buf_info, const struct bpf_reg_state *reg, int regno, int off, int size) argument 6059 check_tp_buffer_access(struct bpf_verifier_env *env, const struct bpf_reg_state *reg, int regno, int off, int size) argument 6075 check_buffer_access(struct bpf_verifier_env *env, const struct bpf_reg_state *reg, int regno, int off, int size, bool zero_size_allowed, u32 *max_access) argument 6395 type_is_rcu(struct bpf_verifier_env *env, struct bpf_reg_state *reg, const char *field_name, u32 btf_id) argument 6406 type_is_rcu_or_null(struct bpf_verifier_env *env, struct bpf_reg_state *reg, const char *field_name, u32 btf_id) argument 6417 type_is_trusted(struct bpf_verifier_env *env, struct bpf_reg_state *reg, const char *field_name, u32 btf_id) argument 6431 check_ptr_to_btf_access(struct bpf_verifier_env *env, struct bpf_reg_state *regs, int regno, int off, int size, enum bpf_access_type atype, int value_regno) argument 6579 check_ptr_to_map_access(struct bpf_verifier_env *env, struct bpf_reg_state *regs, int regno, int off, int size, enum bpf_access_type atype, int value_regno) argument 6645 check_stack_slot_within_bounds(struct bpf_verifier_env *env, s64 off, struct bpf_func_state *state, enum bpf_access_type t) argument 6667 check_stack_access_within_bounds( struct bpf_verifier_env *env, int regno, int off, int access_size, enum bpf_access_src src, enum bpf_access_type type) argument 6736 check_mem_access(struct bpf_verifier_env *env, int insn_idx, u32 regno, int off, int bpf_size, enum bpf_access_type t, int value_regno, bool strict_alignment_once, bool is_ldsx) argument 6975 check_atomic(struct bpf_verifier_env *env, int insn_idx, struct bpf_insn *insn) argument 7089 check_stack_range_initialized( struct bpf_verifier_env *env, int regno, int off, int access_size, bool zero_size_allowed, enum bpf_access_src type, struct bpf_call_arg_meta *meta) argument 7245 check_helper_mem_access(struct bpf_verifier_env *env, int regno, int access_size, bool zero_size_allowed, struct bpf_call_arg_meta *meta) argument 7344 check_mem_size_reg(struct bpf_verifier_env *env, struct bpf_reg_state *reg, u32 regno, bool zero_size_allowed, struct bpf_call_arg_meta *meta) argument 7397 check_mem_reg(struct bpf_verifier_env *env, struct bpf_reg_state *reg, u32 regno, u32 mem_size) argument 7429 check_kfunc_mem_size_reg(struct bpf_verifier_env *env, struct bpf_reg_state *reg, u32 regno) argument 7479 process_spin_lock(struct bpf_verifier_env *env, int regno, bool is_lock) argument 7556 process_timer_func(struct bpf_verifier_env *env, int regno, struct bpf_call_arg_meta *meta) argument 7593 process_kptr_func(struct bpf_verifier_env *env, int regno, struct bpf_call_arg_meta *meta) argument 7657 process_dynptr_func(struct bpf_verifier_env *env, int regno, int insn_idx, enum bpf_arg_type arg_type, int clone_ref_obj_id) argument 7730 iter_ref_obj_id(struct bpf_verifier_env *env, struct bpf_reg_state *reg, int spi) argument 7765 process_iter_arg(struct bpf_verifier_env *env, int regno, int insn_idx, struct bpf_kfunc_call_arg_meta *meta) argument 7841 find_prev_entry(struct bpf_verifier_env *env, struct bpf_verifier_state *cur, int insn_idx) argument 7868 maybe_widen_reg(struct bpf_verifier_env *env, struct bpf_reg_state *rold, struct bpf_reg_state *rcur, struct bpf_idmap *idmap) argument 7881 widen_imprecise_scalars(struct bpf_verifier_env *env, struct bpf_verifier_state *old, struct bpf_verifier_state *cur) argument 7991 process_iter_next_call(struct bpf_verifier_env *env, int insn_idx, struct bpf_kfunc_call_arg_meta *meta) argument 8074 resolve_map_arg_type(struct bpf_verifier_env *env, const struct bpf_call_arg_meta *meta, enum bpf_arg_type *arg_type) argument 8222 check_reg_type(struct bpf_verifier_env *env, u32 regno, enum bpf_arg_type arg_type, const u32 *arg_btf_id, struct bpf_call_arg_meta *meta) argument 8384 check_func_arg_reg_off(struct bpf_verifier_env *env, const struct bpf_reg_state *reg, int regno, enum bpf_arg_type arg_type) argument 8455 get_dynptr_arg_reg(struct bpf_verifier_env *env, const struct bpf_func_proto *fn, struct bpf_reg_state *regs) argument 8477 dynptr_id(struct bpf_verifier_env *env, struct bpf_reg_state *reg) argument 8490 dynptr_ref_obj_id(struct bpf_verifier_env *env, struct bpf_reg_state *reg) argument 8503 dynptr_get_type(struct bpf_verifier_env *env, struct bpf_reg_state *reg) argument 8521 check_reg_const_str(struct bpf_verifier_env *env, struct bpf_reg_state *reg, u32 regno) argument 8569 check_func_arg(struct bpf_verifier_env *env, u32 arg, struct bpf_call_arg_meta *meta, const struct bpf_func_proto *fn, int insn_idx) argument 8828 may_update_sockmap(struct bpf_verifier_env *env, int func_id) argument 8860 allow_tail_call_in_subprogs(struct bpf_verifier_env *env) argument 8866 check_map_func_compatibility(struct bpf_verifier_env *env, struct bpf_map *map, int func_id) argument 9206 clear_all_pkt_pointers(struct bpf_verifier_env *env) argument 9246 release_reference(struct bpf_verifier_env *env, int ref_obj_id) argument 9265 invalidate_non_owning_refs(struct bpf_verifier_env *env) argument 9276 clear_caller_saved_regs(struct bpf_verifier_env *env, struct bpf_reg_state *regs) argument 9297 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) argument 9348 btf_check_func_arg_match(struct bpf_verifier_env *env, int subprog, const struct btf *btf, struct bpf_reg_state *regs) argument 9440 btf_check_subprog_call(struct bpf_verifier_env *env, int subprog, struct bpf_reg_state *regs) argument 9468 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) argument 9536 check_func_call(struct bpf_verifier_env *env, struct bpf_insn *insn, int *insn_idx) argument 9606 map_set_for_each_callback_args(struct bpf_verifier_env *env, struct bpf_func_state *caller, struct bpf_func_state *callee) argument 9633 set_callee_state(struct bpf_verifier_env *env, struct bpf_func_state *caller, struct bpf_func_state *callee, int insn_idx) argument 9647 set_map_elem_callback_state(struct bpf_verifier_env *env, struct bpf_func_state *caller, struct bpf_func_state *callee, int insn_idx) argument 9677 set_loop_callback_state(struct bpf_verifier_env *env, struct bpf_func_state *caller, struct bpf_func_state *callee, int insn_idx) argument 9699 set_timer_callback_state(struct bpf_verifier_env *env, struct bpf_func_state *caller, struct bpf_func_state *callee, int insn_idx) argument 9729 set_find_vma_callback_state(struct bpf_verifier_env *env, struct bpf_func_state *caller, struct bpf_func_state *callee, int insn_idx) argument 9757 set_user_ringbuf_callback_state(struct bpf_verifier_env *env, struct bpf_func_state *caller, struct bpf_func_state *callee, int insn_idx) argument 9780 set_rbtree_add_callback_state(struct bpf_verifier_env *env, struct bpf_func_state *caller, struct bpf_func_state *callee, int insn_idx) argument 9818 in_rbtree_lock_required_cb(struct bpf_verifier_env *env) argument 9842 prepare_func_exit(struct bpf_verifier_env *env, int *insn_idx) argument 9945 do_refine_retval_range(struct bpf_verifier_env *env, struct bpf_reg_state *regs, int ret_type, int func_id, struct bpf_call_arg_meta *meta) argument 9984 record_func_map(struct bpf_verifier_env *env, struct bpf_call_arg_meta *meta, int func_id, int insn_idx) argument 10030 record_func_key(struct bpf_verifier_env *env, struct bpf_call_arg_meta *meta, int func_id, int insn_idx) argument 10066 check_reference_leak(struct bpf_verifier_env *env, bool exception_exit) argument 10085 check_bpf_snprintf_call(struct bpf_verifier_env *env, struct bpf_reg_state *regs) argument 10123 check_get_func_ip(struct bpf_verifier_env *env) argument 10144 cur_aux(struct bpf_verifier_env *env) argument 10149 loop_flag_is_zero(struct bpf_verifier_env *env) argument 10161 update_loop_inline_state(struct bpf_verifier_env *env, u32 subprogno) argument 10179 check_helper_call(struct bpf_verifier_env *env, struct bpf_insn *insn, int *insn_idx_p) argument 10690 mark_btf_func_reg_size(struct bpf_verifier_env *env, u32 regno, size_t reg_size) argument 10893 is_kfunc_arg_callback(struct bpf_verifier_env *env, const struct btf *btf, const struct btf_param *arg) argument 10906 __btf_type_is_scalar_struct(struct bpf_verifier_env *env, const struct btf *btf, const struct btf_type *t, int rec) argument 11066 get_kfunc_ptr_arg_type(struct bpf_verifier_env *env, struct bpf_kfunc_call_arg_meta *meta, const struct btf_type *t, const struct btf_type *ref_t, const char *ref_tname, const struct btf_param *args, int argno, int nargs) argument 11152 process_kf_arg_ptr_to_btf_id(struct bpf_verifier_env *env, struct bpf_reg_state *reg, const struct btf_type *ref_t, const char *ref_tname, u32 ref_id, struct bpf_kfunc_call_arg_meta *meta, int argno) argument 11215 ref_set_non_owning(struct bpf_verifier_env *env, struct bpf_reg_state *reg) argument 11237 ref_convert_owning_non_owning(struct bpf_verifier_env *env, u32 ref_obj_id) argument 11315 check_reg_allocation_locked(struct bpf_verifier_env *env, struct bpf_reg_state *reg) argument 11380 check_kfunc_is_graph_root_api(struct bpf_verifier_env *env, enum btf_field_type head_field_type, u32 kfunc_btf_id) argument 11405 check_kfunc_is_graph_node_api(struct bpf_verifier_env *env, enum btf_field_type node_field_type, u32 kfunc_btf_id) argument 11433 __process_kf_arg_ptr_to_graph_root(struct bpf_verifier_env *env, struct bpf_reg_state *reg, u32 regno, struct bpf_kfunc_call_arg_meta *meta, enum btf_field_type head_field_type, struct btf_field **head_field) argument 11483 process_kf_arg_ptr_to_list_head(struct bpf_verifier_env *env, struct bpf_reg_state *reg, u32 regno, struct bpf_kfunc_call_arg_meta *meta) argument 11491 process_kf_arg_ptr_to_rbtree_root(struct bpf_verifier_env *env, struct bpf_reg_state *reg, u32 regno, struct bpf_kfunc_call_arg_meta *meta) argument 11500 __process_kf_arg_ptr_to_graph_node(struct bpf_verifier_env *env, struct bpf_reg_state *reg, u32 regno, struct bpf_kfunc_call_arg_meta *meta, enum btf_field_type head_field_type, enum btf_field_type node_field_type, struct btf_field **node_field) argument 11564 process_kf_arg_ptr_to_list_node(struct bpf_verifier_env *env, struct bpf_reg_state *reg, u32 regno, struct bpf_kfunc_call_arg_meta *meta) argument 11573 process_kf_arg_ptr_to_rbtree_node(struct bpf_verifier_env *env, struct bpf_reg_state *reg, u32 regno, struct bpf_kfunc_call_arg_meta *meta) argument 11588 check_css_task_iter_allowlist(struct bpf_verifier_env *env) argument 11604 check_kfunc_args(struct bpf_verifier_env *env, struct bpf_kfunc_call_arg_meta *meta, int insn_idx) argument 12049 fetch_kfunc_meta(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_kfunc_call_arg_meta *meta, const char **kfunc_name) argument 12093 check_kfunc_call(struct bpf_verifier_env *env, struct bpf_insn *insn, int *insn_idx_p) argument 12548 check_reg_sane_offset(struct bpf_verifier_env *env, const struct bpf_reg_state *reg, enum bpf_reg_type type) argument 12622 can_skip_alu_sanitation(const struct bpf_verifier_env *env, const struct bpf_insn *insn) argument 12645 sanitize_val_alu(struct bpf_verifier_env *env, struct bpf_insn *insn) argument 12667 sanitize_speculative_path(struct bpf_verifier_env *env, const struct bpf_insn *insn, u32 next_idx, u32 curr_idx) argument 12687 sanitize_ptr_alu(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, const struct bpf_reg_state *off_reg, struct bpf_reg_state *dst_reg, struct bpf_sanitize_info *info, const bool commit_window) argument 12783 sanitize_mark_insn_seen(struct bpf_verifier_env *env) argument 12796 sanitize_err(struct bpf_verifier_env *env, const struct bpf_insn *insn, int reason, const struct bpf_reg_state *off_reg, const struct bpf_reg_state *dst_reg) argument 12845 check_stack_access_for_ptr_arithmetic( struct bpf_verifier_env *env, int regno, const struct bpf_reg_state *reg, int off) argument 12869 sanitize_check_bounds(struct bpf_verifier_env *env, const struct bpf_insn *insn, const struct bpf_reg_state *dst_reg) argument 12906 adjust_ptr_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, const struct bpf_reg_state *off_reg) argument 13714 adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) argument 13875 adjust_reg_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn) argument 13976 check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn) argument 14729 reg_set_min_max(struct bpf_verifier_env *env, struct bpf_reg_state *true_reg1, struct bpf_reg_state *true_reg2, struct bpf_reg_state *false_reg1, struct bpf_reg_state *false_reg2, u8 opcode, bool is_jmp32) argument 14949 check_cond_jmp_op(struct bpf_verifier_env *env, struct bpf_insn *insn, int *insn_idx) argument 15168 check_ld_imm(struct bpf_verifier_env *env, struct bpf_insn *insn) argument 15291 check_ld_abs(struct bpf_verifier_env *env, struct bpf_insn *insn) argument 15373 check_return_code(struct bpf_verifier_env *env, int regno, const char *reg_name) argument 15580 mark_prune_point(struct bpf_verifier_env *env, int idx) argument 15585 is_prune_point(struct bpf_verifier_env *env, int insn_idx) argument 15590 mark_force_checkpoint(struct bpf_verifier_env *env, int idx) argument 15595 is_force_checkpoint(struct bpf_verifier_env *env, int insn_idx) argument 15600 mark_calls_callback(struct bpf_verifier_env *env, int idx) argument 15605 calls_callback(struct bpf_verifier_env *env, int insn_idx) argument 15620 push_insn(int t, int w, int e, struct bpf_verifier_env *env) argument 15668 visit_func_call_insn(int t, struct bpf_insn *insns, struct bpf_verifier_env *env, bool visit_callee) argument 15695 visit_insn(int t, struct bpf_verifier_env *env) argument 15795 check_cfg(struct bpf_verifier_env *env) argument 15879 check_abnormal_return(struct bpf_verifier_env *env) argument 15900 check_btf_func_early(struct bpf_verifier_env *env, const union bpf_attr *attr, bpfptr_t uattr) argument 16002 check_btf_func(struct bpf_verifier_env *env, const union bpf_attr *attr, bpfptr_t uattr) argument 16077 adjust_btf_func(struct bpf_verifier_env *env) argument 16093 check_btf_line(struct bpf_verifier_env *env, const union bpf_attr *attr, bpfptr_t uattr) argument 16221 check_core_relo(struct bpf_verifier_env *env, const union bpf_attr *attr, bpfptr_t uattr) argument 16290 check_btf_info_early(struct bpf_verifier_env *env, const union bpf_attr *attr, bpfptr_t uattr) argument 16318 check_btf_info(struct bpf_verifier_env *env, const union bpf_attr *attr, bpfptr_t uattr) argument 16410 clean_func_state(struct bpf_verifier_env *env, struct bpf_func_state *st) argument 16439 clean_verifier_state(struct bpf_verifier_env *env, struct bpf_verifier_state *st) argument 16484 clean_live_states(struct bpf_verifier_env *env, int insn, struct bpf_verifier_state *cur) argument 16518 regsafe(struct bpf_verifier_env *env, struct bpf_reg_state *rold, struct bpf_reg_state *rcur, struct bpf_idmap *idmap, enum exact_level exact) argument 16652 is_stack_all_misc(struct bpf_verifier_env *env, struct bpf_stack_state *stack) argument 16667 scalar_reg_for_stack(struct bpf_verifier_env *env, struct bpf_stack_state *stack) argument 16679 stacksafe(struct bpf_verifier_env *env, struct bpf_func_state *old, struct bpf_func_state *cur, struct bpf_idmap *idmap, enum exact_level exact) argument 16845 func_states_equal(struct bpf_verifier_env *env, struct bpf_func_state *old, struct bpf_func_state *cur, enum exact_level exact) argument 16867 reset_idmap_scratch(struct bpf_verifier_env *env) argument 16873 states_equal(struct bpf_verifier_env *env, struct bpf_verifier_state *old, struct bpf_verifier_state *cur, enum exact_level exact) argument 16922 propagate_liveness_reg(struct bpf_verifier_env *env, struct bpf_reg_state *reg, struct bpf_reg_state *parent_reg) argument 16955 propagate_liveness(struct bpf_verifier_env *env, const struct bpf_verifier_state *vstate, struct bpf_verifier_state *vparent) argument 17002 propagate_precision(struct bpf_verifier_env *env, const struct bpf_verifier_state *old) argument 17076 is_iter_next_insn(struct bpf_verifier_env *env, int insn_idx) argument 17163 is_state_visited(struct bpf_verifier_env *env, int insn_idx) argument 17540 save_aux_ptr_type(struct bpf_verifier_env *env, enum bpf_reg_type type, bool allow_trust_missmatch) argument 17578 do_check(struct bpf_verifier_env *env) argument 17969 check_pseudo_btf_id(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_insn_aux_data *aux) argument 18118 check_map_prog_compatibility(struct bpf_verifier_env *env, struct bpf_map *map, struct bpf_prog *prog) argument 18205 resolve_pseudo_ldimm64(struct bpf_verifier_env *env) argument 18420 release_maps(struct bpf_verifier_env *env) argument 18427 release_btfs(struct bpf_verifier_env *env) argument 18434 convert_pseudo_ld_imm64(struct bpf_verifier_env *env) argument 18453 adjust_insn_aux_data(struct bpf_verifier_env *env, struct bpf_insn_aux_data *new_data, struct bpf_prog *new_prog, u32 off, u32 cnt) argument 18485 adjust_subprog_starts(struct bpf_verifier_env *env, u32 off, u32 len) argument 18513 bpf_patch_insn_data(struct bpf_verifier_env *env, u32 off, const struct bpf_insn *patch, u32 len) argument 18541 adjust_subprog_starts_after_remove(struct bpf_verifier_env *env, u32 off, u32 cnt) argument 18597 bpf_adj_linfo_after_remove(struct bpf_verifier_env *env, u32 off, u32 cnt) argument 18661 verifier_remove_insns(struct bpf_verifier_env *env, u32 off, u32 cnt) argument 18699 sanitize_dead_code(struct bpf_verifier_env *env) argument 18729 opt_hard_wire_dead_code_branches(struct bpf_verifier_env *env) argument 18755 opt_remove_dead_code(struct bpf_verifier_env *env) argument 18779 opt_remove_nops(struct bpf_verifier_env *env) argument 18800 opt_subreg_zext_lo32_rnd_hi32(struct bpf_verifier_env *env, const union bpf_attr *attr) argument 18904 convert_ctx_accesses(struct bpf_verifier_env *env) argument 19111 jit_subprogs(struct bpf_verifier_env *env) argument 19356 fixup_call_args(struct bpf_verifier_env *env) argument 19408 specialize_kfunc(struct bpf_verifier_env *env, u32 func_id, u16 offset, unsigned long *addr) argument 19459 fixup_kfunc_call(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_insn *insn_buf, int insn_idx, int *cnt) argument 19556 add_hidden_subprog(struct bpf_verifier_env *env, struct bpf_insn *patch, int len) argument 19585 do_misc_fixups(struct bpf_verifier_env *env) argument 20239 inline_bpf_loop(struct bpf_verifier_env *env, int position, s32 stack_base, u32 callback_subprogno, u32 *cnt) argument 20330 optimize_bpf_loop(struct bpf_verifier_env *env) argument 20375 free_states(struct bpf_verifier_env *env) argument 20405 do_check_common(struct bpf_verifier_env *env, int subprog) argument 20552 do_check_subprogs(struct bpf_verifier_env *env) argument 20602 do_check_main(struct bpf_verifier_env *env) argument 20614 print_verification_stats(struct bpf_verifier_env *env) argument 20638 check_struct_ops_btf_id(struct bpf_verifier_env *env) argument 21068 check_attach_btf_id(struct bpf_verifier_env *env) argument 21166 struct bpf_verifier_env *env; local [all...] |
H A D | btf.c | 441 s32 (*check_meta)(struct btf_verifier_env *env, 444 int (*resolve)(struct btf_verifier_env *env, 446 int (*check_member)(struct btf_verifier_env *env, 450 int (*check_kflag_member)(struct btf_verifier_env *env, 454 void (*log_details)(struct btf_verifier_env *env, 464 static int btf_resolve(struct btf_verifier_env *env, 467 static int btf_func_check(struct btf_verifier_env *env, 1416 __printf(2, 3) static void btf_verifier_log(struct btf_verifier_env *env, argument 1419 struct bpf_verifier_log *log = &env->log; 1430 __printf(4, 5) static void __btf_verifier_log_type(struct btf_verifier_env *env, argument 1480 btf_verifier_log_member(struct btf_verifier_env *env, const struct btf_type *struct_type, const struct btf_member *member, const char *fmt, ...) argument 1533 btf_verifier_log_vsi(struct btf_verifier_env *env, const struct btf_type *datasec_type, const struct btf_var_secinfo *vsi, const char *fmt, ...) argument 1560 btf_verifier_log_hdr(struct btf_verifier_env *env, u32 btf_data_size) argument 1584 btf_add_type(struct btf_verifier_env *env, struct btf_type *t) argument 1766 env_resolve_init(struct btf_verifier_env *env) argument 1802 btf_verifier_env_free(struct btf_verifier_env *env) argument 1808 env_type_is_resolve_sink(const struct btf_verifier_env *env, const struct btf_type *next_type) argument 1833 env_type_is_resolved(const struct btf_verifier_env *env, u32 type_id) argument 1843 env_stack_push(struct btf_verifier_env *env, const struct btf_type *t, u32 type_id) argument 1873 env_stack_set_next_member(struct btf_verifier_env *env, u16 next_member) argument 1879 env_stack_pop_resolved(struct btf_verifier_env *env, u32 resolved_type_id, u32 resolved_size) argument 1892 env_stack_peak(struct btf_verifier_env *env) argument 2061 btf_df_check_member(struct btf_verifier_env *env, const struct btf_type *struct_type, const struct btf_member *member, const struct btf_type *member_type) argument 2071 btf_df_check_kflag_member(struct btf_verifier_env *env, const struct btf_type *struct_type, const struct btf_member *member, const struct btf_type *member_type) argument 2084 btf_generic_check_kflag_member(struct btf_verifier_env *env, const struct btf_type *struct_type, const struct btf_member *member, const struct btf_type *member_type) argument 2103 btf_df_resolve(struct btf_verifier_env *env, const struct resolve_vertex *v) argument 2117 btf_int_check_member(struct btf_verifier_env *env, const struct btf_type *struct_type, const struct btf_member *member, const struct btf_type *member_type) argument 2155 btf_int_check_kflag_member(struct btf_verifier_env *env, const struct btf_type *struct_type, const struct btf_member *member, const struct btf_type *member_type) argument 2211 btf_int_check_meta(struct btf_verifier_env *env, const struct btf_type *t, u32 meta_left) argument 2275 btf_int_log(struct btf_verifier_env *env, const struct btf_type *t) argument 2476 btf_modifier_check_member(struct btf_verifier_env *env, const struct btf_type *struct_type, const struct btf_member *member, const struct btf_type *member_type) argument 2501 btf_modifier_check_kflag_member(struct btf_verifier_env *env, const struct btf_type *struct_type, const struct btf_member *member, const struct btf_type *member_type) argument 2526 btf_ptr_check_member(struct btf_verifier_env *env, const struct btf_type *struct_type, const struct btf_member *member, const struct btf_type *member_type) argument 2552 btf_ref_type_check_meta(struct btf_verifier_env *env, const struct btf_type *t, u32 meta_left) argument 2600 btf_modifier_resolve(struct btf_verifier_env *env, const struct resolve_vertex *v) argument 2642 btf_var_resolve(struct btf_verifier_env *env, const struct resolve_vertex *v) argument 2688 btf_ptr_resolve(struct btf_verifier_env *env, const struct resolve_vertex *v) argument 2785 btf_ref_type_log(struct btf_verifier_env *env, const struct btf_type *t) argument 2809 btf_fwd_check_meta(struct btf_verifier_env *env, const struct btf_type *t, u32 meta_left) argument 2835 btf_fwd_type_log(struct btf_verifier_env *env, const struct btf_type *t) argument 2850 btf_array_check_member(struct btf_verifier_env *env, const struct btf_type *struct_type, const struct btf_member *member, const struct btf_type *member_type) argument 2879 btf_array_check_meta(struct btf_verifier_env *env, const struct btf_type *t, u32 meta_left) argument 2932 btf_array_resolve(struct btf_verifier_env *env, const struct resolve_vertex *v) argument 2997 btf_array_log(struct btf_verifier_env *env, const struct btf_type *t) argument 3101 btf_struct_check_member(struct btf_verifier_env *env, const struct btf_type *struct_type, const struct btf_member *member, const struct btf_type *member_type) argument 3126 btf_struct_check_meta(struct btf_verifier_env *env, const struct btf_type *t, u32 meta_left) argument 3207 btf_struct_resolve(struct btf_verifier_env *env, const struct resolve_vertex *v) argument 3278 btf_struct_log(struct btf_verifier_env *env, const struct btf_type *t) argument 4066 btf_enum_check_member(struct btf_verifier_env *env, const struct btf_type *struct_type, const struct btf_member *member, const struct btf_type *member_type) argument 4091 btf_enum_check_kflag_member(struct btf_verifier_env *env, const struct btf_type *struct_type, const struct btf_member *member, const struct btf_type *member_type) argument 4126 btf_enum_check_meta(struct btf_verifier_env *env, const struct btf_type *t, u32 meta_left) argument 4185 btf_enum_log(struct btf_verifier_env *env, const struct btf_type *t) argument 4234 btf_enum64_check_meta(struct btf_verifier_env *env, const struct btf_type *t, u32 meta_left) argument 4337 btf_func_proto_check_meta(struct btf_verifier_env *env, const struct btf_type *t, u32 meta_left) argument 4365 btf_func_proto_log(struct btf_verifier_env *env, const struct btf_type *t) argument 4424 btf_func_check_meta(struct btf_verifier_env *env, const struct btf_type *t, u32 meta_left) argument 4449 btf_func_resolve(struct btf_verifier_env *env, const struct resolve_vertex *v) argument 4473 btf_var_check_meta(struct btf_verifier_env *env, const struct btf_type *t, u32 meta_left) argument 4521 btf_var_log(struct btf_verifier_env *env, const struct btf_type *t) argument 4537 btf_datasec_check_meta(struct btf_verifier_env *env, const struct btf_type *t, u32 meta_left) argument 4610 btf_datasec_resolve(struct btf_verifier_env *env, const struct resolve_vertex *v) argument 4650 btf_datasec_log(struct btf_verifier_env *env, const struct btf_type *t) argument 4689 btf_float_check_meta(struct btf_verifier_env *env, const struct btf_type *t, u32 meta_left) argument 4714 btf_float_check_member(struct btf_verifier_env *env, const struct btf_type *struct_type, const struct btf_member *member, const struct btf_type *member_type) argument 4749 btf_float_log(struct btf_verifier_env *env, const struct btf_type *t) argument 4764 btf_decl_tag_check_meta(struct btf_verifier_env *env, const struct btf_type *t, u32 meta_left) argument 4807 btf_decl_tag_resolve(struct btf_verifier_env *env, const struct resolve_vertex *v) argument 4853 btf_decl_tag_log(struct btf_verifier_env *env, const struct btf_type *t) argument 4868 btf_func_proto_check(struct btf_verifier_env *env, const struct btf_type *t) argument 4963 btf_func_check(struct btf_verifier_env *env, const struct btf_type *t) argument 5013 btf_check_meta(struct btf_verifier_env *env, const struct btf_type *t, u32 meta_left) argument 5055 btf_check_all_metas(struct btf_verifier_env *env) argument 5082 btf_resolve_valid(struct btf_verifier_env *env, const struct btf_type *t, u32 type_id) argument 5123 btf_resolve(struct btf_verifier_env *env, const struct btf_type *t, u32 type_id) argument 5156 btf_check_all_types(struct btf_verifier_env *env) argument 5190 btf_parse_type_sec(struct btf_verifier_env *env) argument 5213 btf_parse_str_sec(struct btf_verifier_env *env) argument 5257 btf_check_sec_info(struct btf_verifier_env *env, u32 btf_data_size) argument 5310 btf_parse_hdr(struct btf_verifier_env *env) argument 5480 btf_check_type_tags(struct btf_verifier_env *env, struct btf *btf, int start_id) argument 5547 struct btf_verifier_env *env = NULL; local 5969 struct btf_verifier_env *env = NULL; local 6036 struct btf_verifier_env *env = NULL; local 7129 btf_prepare_func_args(struct bpf_verifier_env *env, int subprog) argument [all...] |