Lines Matching defs:env
274 find_linfo(const struct bpf_verifier_env *env, u32 insn_off) in find_linfo()
335 __printf(2, 3) void bpf_verifier_log_write(struct bpf_verifier_env *env, in bpf_verifier_log_write()
351 struct bpf_verifier_env *env = private_data; in verbose() local
384 __printf(3, 4) static void verbose_linfo(struct bpf_verifier_env *env, in verbose_linfo()
412 static void verbose_invalid_scalar(struct bpf_verifier_env *env, in verbose_invalid_scalar()
550 static const char *reg_type_str(struct bpf_verifier_env *env, in reg_type_str()
609 static void print_liveness(struct bpf_verifier_env *env, in print_liveness()
641 static struct bpf_func_state *func(struct bpf_verifier_env *env, in func()
654 static void mark_reg_scratched(struct bpf_verifier_env *env, u32 regno) in mark_reg_scratched()
659 static void mark_stack_slot_scratched(struct bpf_verifier_env *env, u32 spi) in mark_stack_slot_scratched()
664 static bool reg_scratched(const struct bpf_verifier_env *env, u32 regno) in reg_scratched()
669 static bool stack_slot_scratched(const struct bpf_verifier_env *env, u64 regno) in stack_slot_scratched()
674 static bool verifier_state_scratched(const struct bpf_verifier_env *env) in verifier_state_scratched()
679 static void mark_verifier_state_clean(struct bpf_verifier_env *env) in mark_verifier_state_clean()
686 static void mark_verifier_state_scratched(struct bpf_verifier_env *env) in mark_verifier_state_scratched()
709 static int mark_stack_slots_dynptr(struct bpf_verifier_env *env, struct bpf_reg_state *reg, in mark_stack_slots_dynptr()
747 static int unmark_stack_slots_dynptr(struct bpf_verifier_env *env, struct bpf_reg_state *reg) in unmark_stack_slots_dynptr()
776 static bool is_dynptr_reg_valid_uninit(struct bpf_verifier_env *env, struct bpf_reg_state *reg) in is_dynptr_reg_valid_uninit()
794 bool is_dynptr_reg_valid_init(struct bpf_verifier_env *env, in is_dynptr_reg_valid_init()
814 bool is_dynptr_type_expected(struct bpf_verifier_env *env, in is_dynptr_type_expected()
845 static void print_verifier_state(struct bpf_verifier_env *env, in print_verifier_state()
991 static void print_insn_state(struct bpf_verifier_env *env, in print_insn_state()
1118 static int acquire_reference_state(struct bpf_verifier_env *env, int insn_idx) in acquire_reference_state()
1242 static void update_branch_counts(struct bpf_verifier_env *env, struct bpf_verifier_state *st) in update_branch_counts()
1259 static int pop_stack(struct bpf_verifier_env *env, int *prev_insn_idx, in pop_stack()
1288 static struct bpf_verifier_state *push_stack(struct bpf_verifier_env *env, in push_stack()
1393 static void mark_reg_known_zero(struct bpf_verifier_env *env, in mark_reg_known_zero()
1695 static void __mark_reg_unknown(const struct bpf_verifier_env *env, in __mark_reg_unknown()
1710 static void mark_reg_unknown(struct bpf_verifier_env *env, in mark_reg_unknown()
1723 static void __mark_reg_not_init(const struct bpf_verifier_env *env, in __mark_reg_not_init()
1730 static void mark_reg_not_init(struct bpf_verifier_env *env, in mark_reg_not_init()
1743 static void mark_btf_ld_reg(struct bpf_verifier_env *env, in mark_btf_ld_reg()
1760 static void init_reg_state(struct bpf_verifier_env *env, in init_reg_state()
1780 static void init_func_state(struct bpf_verifier_env *env, in init_func_state()
1793 static struct bpf_verifier_state *push_async_cb(struct bpf_verifier_env *env, in push_async_cb()
1852 static int find_subprog(struct bpf_verifier_env *env, int off) in find_subprog()
1864 static int add_subprog(struct bpf_verifier_env *env, int off) in add_subprog()
1944 static struct btf *__find_kfunc_desc_btf(struct bpf_verifier_env *env, in __find_kfunc_desc_btf()
2014 static struct btf *find_kfunc_desc_btf(struct bpf_verifier_env *env, s16 offset) in find_kfunc_desc_btf()
2030 static int add_kfunc_call(struct bpf_verifier_env *env, u32 func_id, s16 offset) in add_kfunc_call()
2191 static int add_subprog_and_kfunc(struct bpf_verifier_env *env) in add_subprog_and_kfunc()
2233 static int check_subprogs(struct bpf_verifier_env *env) in check_subprogs()
2285 static int mark_reg_read(struct bpf_verifier_env *env, in mark_reg_read()
2337 static bool is_reg64(struct bpf_verifier_env *env, struct bpf_insn *insn, in is_reg64()
2445 static bool insn_has_def32(struct bpf_verifier_env *env, struct bpf_insn *insn) in insn_has_def32()
2455 static void mark_insn_zext(struct bpf_verifier_env *env, in mark_insn_zext()
2468 static int check_reg_arg(struct bpf_verifier_env *env, u32 regno, in check_reg_arg()
2516 static int push_jmp_history(struct bpf_verifier_env *env, in push_jmp_history()
2589 static int backtrack_insn(struct bpf_verifier_env *env, int idx, in backtrack_insn()
2805 static void mark_all_scalars_precise(struct bpf_verifier_env *env, in mark_all_scalars_precise()
2839 static void mark_all_scalars_imprecise(struct bpf_verifier_env *env, struct bpf_verifier_state *st) in mark_all_scalars_imprecise()
2951 static int __mark_chain_precision(struct bpf_verifier_env *env, int frame, int regno, in __mark_chain_precision()
3139 int mark_chain_precision(struct bpf_verifier_env *env, int regno) in mark_chain_precision()
3144 static int mark_chain_precision_frame(struct bpf_verifier_env *env, int frame, int regno) in mark_chain_precision_frame()
3149 static int mark_chain_precision_stack_frame(struct bpf_verifier_env *env, int frame, int spi) in mark_chain_precision_stack_frame()
3251 static int check_stack_write_fixed_off(struct bpf_verifier_env *env, in check_stack_write_fixed_off()
3390 static int check_stack_write_var_off(struct bpf_verifier_env *env, in check_stack_write_var_off()
3488 static void mark_reg_stack_read(struct bpf_verifier_env *env, in mark_reg_stack_read()
3539 static int check_stack_read_fixed_off(struct bpf_verifier_env *env, in check_stack_read_fixed_off()
3644 static struct bpf_reg_state *reg_state(struct bpf_verifier_env *env, int regno) in reg_state()
3662 static int check_stack_read_var_off(struct bpf_verifier_env *env, in check_stack_read_var_off()
3693 static int check_stack_read(struct bpf_verifier_env *env, in check_stack_read()
3750 static int check_stack_write(struct bpf_verifier_env *env, in check_stack_write()
3773 static int check_map_access_type(struct bpf_verifier_env *env, u32 regno, in check_map_access_type()
3796 static int __check_mem_access(struct bpf_verifier_env *env, int regno, in __check_mem_access()
3832 static int check_mem_region_access(struct bpf_verifier_env *env, u32 regno, in check_mem_region_access()
3887 static int __check_ptr_off_reg(struct bpf_verifier_env *env, in __check_ptr_off_reg()
3919 int check_ptr_off_reg(struct bpf_verifier_env *env, in check_ptr_off_reg()
3925 static int map_kptr_match_type(struct bpf_verifier_env *env, in map_kptr_match_type()
3997 static int check_map_kptr_access(struct bpf_verifier_env *env, u32 regno, in check_map_kptr_access()
4053 static int check_map_access(struct bpf_verifier_env *env, u32 regno, in check_map_access()
4126 static bool may_access_direct_pkt_data(struct bpf_verifier_env *env, in may_access_direct_pkt_data()
4168 static int check_packet_access(struct bpf_verifier_env *env, u32 regno, int off, in check_packet_access()
4211 static int check_ctx_access(struct bpf_verifier_env *env, int insn_idx, int off, int size, in check_ctx_access()
4247 static int check_flow_keys_access(struct bpf_verifier_env *env, int off, in check_flow_keys_access()
4259 static int check_sock_access(struct bpf_verifier_env *env, int insn_idx, in check_sock_access()
4304 static bool is_pointer_value(struct bpf_verifier_env *env, int regno) in is_pointer_value()
4309 static bool is_ctx_reg(struct bpf_verifier_env *env, int regno) in is_ctx_reg()
4316 static bool is_sk_reg(struct bpf_verifier_env *env, int regno) in is_sk_reg()
4323 static bool is_pkt_reg(struct bpf_verifier_env *env, int regno) in is_pkt_reg()
4330 static bool is_flow_key_reg(struct bpf_verifier_env *env, int regno) in is_flow_key_reg()
4338 static int check_pkt_ptr_alignment(struct bpf_verifier_env *env, in check_pkt_ptr_alignment()
4373 static int check_generic_ptr_alignment(struct bpf_verifier_env *env, in check_generic_ptr_alignment()
4397 static int check_ptr_alignment(struct bpf_verifier_env *env, in check_ptr_alignment()
4450 static int update_stack_depth(struct bpf_verifier_env *env, in update_stack_depth()
4470 static int check_max_stack_depth_subprog(struct bpf_verifier_env *env, int idx) in check_max_stack_depth_subprog()
4581 static int check_max_stack_depth(struct bpf_verifier_env *env) in check_max_stack_depth()
4598 static int get_callee_stack_depth(struct bpf_verifier_env *env, in get_callee_stack_depth()
4613 static int __check_buffer_access(struct bpf_verifier_env *env, in __check_buffer_access()
4637 static int check_tp_buffer_access(struct bpf_verifier_env *env, in check_tp_buffer_access()
4653 static int check_buffer_access(struct bpf_verifier_env *env, in check_buffer_access()
4760 static int check_ptr_to_btf_access(struct bpf_verifier_env *env, in check_ptr_to_btf_access()
4831 static int check_ptr_to_map_access(struct bpf_verifier_env *env, in check_ptr_to_map_access()
4915 struct bpf_verifier_env *env, in check_stack_access_within_bounds()
4973 static int check_mem_access(struct bpf_verifier_env *env, int insn_idx, u32 regno, in check_mem_access()
5213 static int check_atomic(struct bpf_verifier_env *env, int insn_idx, struct bpf_insn *insn) in check_atomic()
5327 struct bpf_verifier_env *env, int regno, int off, in check_stack_range_initialized()
5454 static int check_helper_mem_access(struct bpf_verifier_env *env, int regno, in check_helper_mem_access()
5544 static int check_mem_size_reg(struct bpf_verifier_env *env, in check_mem_size_reg()
5599 int check_mem_reg(struct bpf_verifier_env *env, struct bpf_reg_state *reg, in check_mem_reg()
5631 int check_kfunc_mem_size_reg(struct bpf_verifier_env *env, struct bpf_reg_state *reg, in check_kfunc_mem_size_reg()
5678 static int process_spin_lock(struct bpf_verifier_env *env, int regno, in process_spin_lock()
5740 static int process_timer_func(struct bpf_verifier_env *env, int regno, in process_timer_func()
5788 static int process_kptr_func(struct bpf_verifier_env *env, int regno, in process_kptr_func()
5861 static int resolve_map_arg_type(struct bpf_verifier_env *env, in resolve_map_arg_type()
5999 static int check_reg_type(struct bpf_verifier_env *env, u32 regno, in check_reg_type()
6087 int check_func_arg_reg_off(struct bpf_verifier_env *env, in check_func_arg_reg_off()
6143 static u32 stack_slot_get_id(struct bpf_verifier_env *env, struct bpf_reg_state *reg) in stack_slot_get_id()
6151 static int check_func_arg(struct bpf_verifier_env *env, u32 arg, in check_func_arg()
6468 static bool may_update_sockmap(struct bpf_verifier_env *env, int func_id) in may_update_sockmap()
6500 static bool allow_tail_call_in_subprogs(struct bpf_verifier_env *env) in allow_tail_call_in_subprogs()
6506 static int check_map_func_compatibility(struct bpf_verifier_env *env, in check_map_func_compatibility()
6828 static void clear_all_pkt_pointers(struct bpf_verifier_env *env) in clear_all_pkt_pointers()
6868 static int release_reference(struct bpf_verifier_env *env, in release_reference()
6891 static void clear_caller_saved_regs(struct bpf_verifier_env *env, in clear_caller_saved_regs()
6912 static int __check_func_call(struct bpf_verifier_env *env, struct bpf_insn *insn, in __check_func_call()
7044 int map_set_for_each_callback_args(struct bpf_verifier_env *env, in map_set_for_each_callback_args()
7071 static int set_callee_state(struct bpf_verifier_env *env, in set_callee_state()
7085 static int check_func_call(struct bpf_verifier_env *env, struct bpf_insn *insn, in check_func_call()
7101 static int set_map_elem_callback_state(struct bpf_verifier_env *env, in set_map_elem_callback_state()
7131 static int set_loop_callback_state(struct bpf_verifier_env *env, in set_loop_callback_state()
7153 static int set_timer_callback_state(struct bpf_verifier_env *env, in set_timer_callback_state()
7183 static int set_find_vma_callback_state(struct bpf_verifier_env *env, in set_find_vma_callback_state()
7211 static int set_user_ringbuf_callback_state(struct bpf_verifier_env *env, in set_user_ringbuf_callback_state()
7235 static int prepare_func_exit(struct bpf_verifier_env *env, int *insn_idx) in prepare_func_exit()
7327 record_func_map(struct bpf_verifier_env *env, struct bpf_call_arg_meta *meta, in record_func_map()
7373 record_func_key(struct bpf_verifier_env *env, struct bpf_call_arg_meta *meta, in record_func_key()
7409 static int check_reference_leak(struct bpf_verifier_env *env) in check_reference_leak()
7428 static int check_bpf_snprintf_call(struct bpf_verifier_env *env, in check_bpf_snprintf_call()
7466 static int check_get_func_ip(struct bpf_verifier_env *env) in check_get_func_ip()
7487 static struct bpf_insn_aux_data *cur_aux(struct bpf_verifier_env *env) in cur_aux()
7492 static bool loop_flag_is_zero(struct bpf_verifier_env *env) in loop_flag_is_zero()
7504 static void update_loop_inline_state(struct bpf_verifier_env *env, u32 subprogno) in update_loop_inline_state()
7522 static int check_helper_call(struct bpf_verifier_env *env, struct bpf_insn *insn, in check_helper_call()
7925 static void mark_btf_func_reg_size(struct bpf_verifier_env *env, u32 regno, in mark_btf_func_reg_size()
7946 static int check_kfunc_call(struct bpf_verifier_env *env, struct bpf_insn *insn, in check_kfunc_call()
8121 static bool check_reg_sane_offset(struct bpf_verifier_env *env, in check_reg_sane_offset()
8195 static bool can_skip_alu_sanitation(const struct bpf_verifier_env *env, in can_skip_alu_sanitation()
8218 static int sanitize_val_alu(struct bpf_verifier_env *env, in sanitize_val_alu()
8240 sanitize_speculative_path(struct bpf_verifier_env *env, in sanitize_speculative_path()
8260 static int sanitize_ptr_alu(struct bpf_verifier_env *env, in sanitize_ptr_alu()
8356 static void sanitize_mark_insn_seen(struct bpf_verifier_env *env) in sanitize_mark_insn_seen()
8369 static int sanitize_err(struct bpf_verifier_env *env, in sanitize_err()
8419 struct bpf_verifier_env *env, in check_stack_access_for_ptr_arithmetic()
8442 static int sanitize_check_bounds(struct bpf_verifier_env *env, in sanitize_check_bounds()
8479 static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env, in adjust_ptr_min_max_vals()
9280 static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, in adjust_scalar_min_max_vals()
9441 static int adjust_reg_min_max_vals(struct bpf_verifier_env *env, in adjust_reg_min_max_vals()
9527 static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn) in check_alu_op()
10415 static int check_cond_jmp_op(struct bpf_verifier_env *env, in check_cond_jmp_op()
10613 static int check_ld_imm(struct bpf_verifier_env *env, struct bpf_insn *insn) in check_ld_imm()
10732 static int check_ld_abs(struct bpf_verifier_env *env, struct bpf_insn *insn) in check_ld_abs()
10809 static int check_return_code(struct bpf_verifier_env *env) in check_return_code()
11011 static u32 state_htab_size(struct bpf_verifier_env *env) in state_htab_size()
11017 struct bpf_verifier_env *env, in explored_state()
11026 static void init_explored_state(struct bpf_verifier_env *env, int idx) in init_explored_state()
11041 static int push_insn(int t, int w, int e, struct bpf_verifier_env *env, in push_insn()
11090 struct bpf_verifier_env *env, in visit_func_call_insn()
11118 static int visit_insn(int t, int insn_cnt, struct bpf_verifier_env *env) in visit_insn()
11183 static int check_cfg(struct bpf_verifier_env *env) in check_cfg()
11246 static int check_abnormal_return(struct bpf_verifier_env *env) in check_abnormal_return()
11267 static int check_btf_func(struct bpf_verifier_env *env, in check_btf_func()
11398 static void adjust_btf_func(struct bpf_verifier_env *env) in adjust_btf_func()
11413 static int check_btf_line(struct bpf_verifier_env *env, in check_btf_line()
11541 static int check_core_relo(struct bpf_verifier_env *env, in check_core_relo()
11610 static int check_btf_info(struct bpf_verifier_env *env, in check_btf_info()
11690 static void clean_func_state(struct bpf_verifier_env *env, in clean_func_state()
11719 static void clean_verifier_state(struct bpf_verifier_env *env, in clean_verifier_state()
11764 static void clean_live_states(struct bpf_verifier_env *env, int insn, in clean_live_states()
11787 static bool regsafe(struct bpf_verifier_env *env, struct bpf_reg_state *rold, in regsafe()
11905 static bool stacksafe(struct bpf_verifier_env *env, struct bpf_func_state *old, in stacksafe()
12002 static bool func_states_equal(struct bpf_verifier_env *env, struct bpf_func_state *old, in func_states_equal()
12022 static bool states_equal(struct bpf_verifier_env *env, in states_equal()
12055 static int propagate_liveness_reg(struct bpf_verifier_env *env, in propagate_liveness_reg()
12088 static int propagate_liveness(struct bpf_verifier_env *env, in propagate_liveness()
12135 static int propagate_precision(struct bpf_verifier_env *env, in propagate_precision()
12195 static int is_state_visited(struct bpf_verifier_env *env, int insn_idx) in is_state_visited()
12455 static int do_check(struct bpf_verifier_env *env) in do_check()
12827 static int check_pseudo_btf_id(struct bpf_verifier_env *env, in check_pseudo_btf_id()
12971 static int check_map_prog_compatibility(struct bpf_verifier_env *env, in check_map_prog_compatibility()
13051 static int resolve_pseudo_ldimm64(struct bpf_verifier_env *env) in resolve_pseudo_ldimm64()
13235 static void release_maps(struct bpf_verifier_env *env) in release_maps()
13242 static void release_btfs(struct bpf_verifier_env *env) in release_btfs()
13249 static void convert_pseudo_ld_imm64(struct bpf_verifier_env *env) in convert_pseudo_ld_imm64()
13268 static void adjust_insn_aux_data(struct bpf_verifier_env *env, in adjust_insn_aux_data()
13300 static void adjust_subprog_starts(struct bpf_verifier_env *env, u32 off, u32 len) in adjust_subprog_starts()
13328 static struct bpf_prog *bpf_patch_insn_data(struct bpf_verifier_env *env, u32 off, in bpf_patch_insn_data()
13356 static int adjust_subprog_starts_after_remove(struct bpf_verifier_env *env, in adjust_subprog_starts_after_remove()
13412 static int bpf_adj_linfo_after_remove(struct bpf_verifier_env *env, u32 off, in bpf_adj_linfo_after_remove()
13476 static int verifier_remove_insns(struct bpf_verifier_env *env, u32 off, u32 cnt) in verifier_remove_insns()
13514 static void sanitize_dead_code(struct bpf_verifier_env *env) in sanitize_dead_code()
13544 static void opt_hard_wire_dead_code_branches(struct bpf_verifier_env *env) in opt_hard_wire_dead_code_branches()
13570 static int opt_remove_dead_code(struct bpf_verifier_env *env) in opt_remove_dead_code()
13594 static int opt_remove_nops(struct bpf_verifier_env *env) in opt_remove_nops()
13615 static int opt_subreg_zext_lo32_rnd_hi32(struct bpf_verifier_env *env, in opt_subreg_zext_lo32_rnd_hi32()
13719 static int convert_ctx_accesses(struct bpf_verifier_env *env) in convert_ctx_accesses()
13904 static int jit_subprogs(struct bpf_verifier_env *env) in jit_subprogs()
14135 static int fixup_call_args(struct bpf_verifier_env *env) in fixup_call_args()
14186 static int fixup_kfunc_call(struct bpf_verifier_env *env, in fixup_kfunc_call()
14214 static int do_misc_fixups(struct bpf_verifier_env *env) in do_misc_fixups()
14732 static struct bpf_prog *inline_bpf_loop(struct bpf_verifier_env *env, in inline_bpf_loop()
14823 static int optimize_bpf_loop(struct bpf_verifier_env *env) in optimize_bpf_loop()
14868 static void free_states(struct bpf_verifier_env *env) in free_states()
14898 static int do_check_common(struct bpf_verifier_env *env, int subprog) in do_check_common()
14996 static int do_check_subprogs(struct bpf_verifier_env *env) in do_check_subprogs()
15021 static int do_check_main(struct bpf_verifier_env *env) in do_check_main()
15033 static void print_verification_stats(struct bpf_verifier_env *env) in print_verification_stats()
15057 static int check_struct_ops_btf_id(struct bpf_verifier_env *env) in check_struct_ops_btf_id()
15489 struct bpf_verifier_env *env; in bpf_check() local