Lines Matching defs:env
250 find_linfo(const struct bpf_verifier_env *env, u32 insn_off) in find_linfo()
309 __printf(2, 3) void bpf_verifier_log_write(struct bpf_verifier_env *env, in bpf_verifier_log_write()
325 struct bpf_verifier_env *env = private_data; in verbose() local
357 __printf(3, 4) static void verbose_linfo(struct bpf_verifier_env *env, in verbose_linfo()
538 static void print_liveness(struct bpf_verifier_env *env, in print_liveness()
551 static struct bpf_func_state *func(struct bpf_verifier_env *env, in func()
565 static void print_verifier_state(struct bpf_verifier_env *env, in print_verifier_state()
772 static int acquire_reference_state(struct bpf_verifier_env *env, int insn_idx) in acquire_reference_state()
911 static void update_branch_counts(struct bpf_verifier_env *env, struct bpf_verifier_state *st) in update_branch_counts()
928 static int pop_stack(struct bpf_verifier_env *env, int *prev_insn_idx, in pop_stack()
957 static struct bpf_verifier_state *push_stack(struct bpf_verifier_env *env, in push_stack()
1062 static void mark_reg_known_zero(struct bpf_verifier_env *env, in mark_reg_known_zero()
1334 static void __mark_reg_unknown(const struct bpf_verifier_env *env, in __mark_reg_unknown()
1349 static void mark_reg_unknown(struct bpf_verifier_env *env, in mark_reg_unknown()
1362 static void __mark_reg_not_init(const struct bpf_verifier_env *env, in __mark_reg_not_init()
1369 static void mark_reg_not_init(struct bpf_verifier_env *env, in mark_reg_not_init()
1382 static void mark_btf_ld_reg(struct bpf_verifier_env *env, in mark_btf_ld_reg()
1396 static void init_reg_state(struct bpf_verifier_env *env, in init_reg_state()
1416 static void init_func_state(struct bpf_verifier_env *env, in init_func_state()
1438 static int find_subprog(struct bpf_verifier_env *env, int off) in find_subprog()
1450 static int add_subprog(struct bpf_verifier_env *env, int off) in add_subprog()
1472 static int check_subprogs(struct bpf_verifier_env *env) in check_subprogs()
1554 static int mark_reg_read(struct bpf_verifier_env *env, in mark_reg_read()
1606 static bool is_reg64(struct bpf_verifier_env *env, struct bpf_insn *insn, in is_reg64()
1696 static bool insn_has_def32(struct bpf_verifier_env *env, struct bpf_insn *insn) in insn_has_def32()
1704 static void mark_insn_zext(struct bpf_verifier_env *env, in mark_insn_zext()
1717 static int check_reg_arg(struct bpf_verifier_env *env, u32 regno, in check_reg_arg()
1763 static int push_jmp_history(struct bpf_verifier_env *env, in push_jmp_history()
1801 static int backtrack_insn(struct bpf_verifier_env *env, int idx, in backtrack_insn()
1989 static void mark_all_scalars_precise(struct bpf_verifier_env *env, in mark_all_scalars_precise()
2019 static int __mark_chain_precision(struct bpf_verifier_env *env, int regno, in __mark_chain_precision()
2181 static int mark_chain_precision(struct bpf_verifier_env *env, int regno) in mark_chain_precision()
2186 static int mark_chain_precision_stack(struct bpf_verifier_env *env, int spi) in mark_chain_precision_stack()
2272 static int check_stack_write(struct bpf_verifier_env *env, in check_stack_write()
2400 static int check_stack_read(struct bpf_verifier_env *env, in check_stack_read()
2501 static int check_stack_access(struct bpf_verifier_env *env, in check_stack_access()
2526 static int check_map_access_type(struct bpf_verifier_env *env, u32 regno, in check_map_access_type()
2549 static int __check_mem_access(struct bpf_verifier_env *env, int regno, in __check_mem_access()
2581 static int check_mem_region_access(struct bpf_verifier_env *env, u32 regno, in check_mem_region_access()
2640 static int check_map_access(struct bpf_verifier_env *env, u32 regno, in check_map_access()
2678 static bool may_access_direct_pkt_data(struct bpf_verifier_env *env, in may_access_direct_pkt_data()
2720 static int check_packet_access(struct bpf_verifier_env *env, u32 regno, int off, in check_packet_access()
2761 static int check_ctx_access(struct bpf_verifier_env *env, int insn_idx, int off, int size, in check_ctx_access()
2795 static int check_flow_keys_access(struct bpf_verifier_env *env, int off, in check_flow_keys_access()
2807 static int check_sock_access(struct bpf_verifier_env *env, int insn_idx, in check_sock_access()
2852 static struct bpf_reg_state *reg_state(struct bpf_verifier_env *env, int regno) in reg_state()
2857 static bool is_pointer_value(struct bpf_verifier_env *env, int regno) in is_pointer_value()
2862 static bool is_ctx_reg(struct bpf_verifier_env *env, int regno) in is_ctx_reg()
2869 static bool is_sk_reg(struct bpf_verifier_env *env, int regno) in is_sk_reg()
2876 static bool is_pkt_reg(struct bpf_verifier_env *env, int regno) in is_pkt_reg()
2883 static bool is_flow_key_reg(struct bpf_verifier_env *env, int regno) in is_flow_key_reg()
2891 static int check_pkt_ptr_alignment(struct bpf_verifier_env *env, in check_pkt_ptr_alignment()
2926 static int check_generic_ptr_alignment(struct bpf_verifier_env *env, in check_generic_ptr_alignment()
2950 static int check_ptr_alignment(struct bpf_verifier_env *env, in check_ptr_alignment()
3000 static int update_stack_depth(struct bpf_verifier_env *env, in update_stack_depth()
3020 static int check_max_stack_depth(struct bpf_verifier_env *env) in check_max_stack_depth()
3118 static int get_callee_stack_depth(struct bpf_verifier_env *env, in get_callee_stack_depth()
3133 int check_ctx_reg(struct bpf_verifier_env *env, in check_ctx_reg()
3157 static int __check_buffer_access(struct bpf_verifier_env *env, in __check_buffer_access()
3181 static int check_tp_buffer_access(struct bpf_verifier_env *env, in check_tp_buffer_access()
3197 static int check_buffer_access(struct bpf_verifier_env *env, in check_buffer_access()
3289 static int check_ptr_to_btf_access(struct bpf_verifier_env *env, in check_ptr_to_btf_access()
3339 static int check_ptr_to_map_access(struct bpf_verifier_env *env, in check_ptr_to_map_access()
3401 static int check_mem_access(struct bpf_verifier_env *env, int insn_idx, u32 regno, in check_mem_access()
3597 static int check_xadd(struct bpf_verifier_env *env, int insn_idx, struct bpf_insn *insn) in check_xadd()
3643 static int __check_stack_boundary(struct bpf_verifier_env *env, u32 regno, in __check_stack_boundary()
3672 static int check_stack_boundary(struct bpf_verifier_env *env, int regno, in check_stack_boundary()
3790 static int check_helper_mem_access(struct bpf_verifier_env *env, int regno, in check_helper_mem_access()
3859 static int process_spin_lock(struct bpf_verifier_env *env, int regno, in process_spin_lock()
3955 static int resolve_map_arg_type(struct bpf_verifier_env *env, in resolve_map_arg_type()
4077 static int check_reg_type(struct bpf_verifier_env *env, u32 regno, in check_reg_type()
4135 static int check_func_arg(struct bpf_verifier_env *env, u32 arg, in check_func_arg()
4327 static bool may_update_sockmap(struct bpf_verifier_env *env, int func_id) in may_update_sockmap()
4359 static bool allow_tail_call_in_subprogs(struct bpf_verifier_env *env) in allow_tail_call_in_subprogs()
4364 static int check_map_func_compatibility(struct bpf_verifier_env *env, in check_map_func_compatibility()
4661 static void __clear_all_pkt_pointers(struct bpf_verifier_env *env, in __clear_all_pkt_pointers()
4679 static void clear_all_pkt_pointers(struct bpf_verifier_env *env) in clear_all_pkt_pointers()
4688 static void release_reg_references(struct bpf_verifier_env *env, in release_reg_references()
4710 static int release_reference(struct bpf_verifier_env *env, in release_reference()
4727 static void clear_caller_saved_regs(struct bpf_verifier_env *env, in clear_caller_saved_regs()
4739 static int check_func_call(struct bpf_verifier_env *env, struct bpf_insn *insn, in check_func_call()
4838 static int prepare_func_exit(struct bpf_verifier_env *env, int *insn_idx) in prepare_func_exit()
4904 record_func_map(struct bpf_verifier_env *env, struct bpf_call_arg_meta *meta, in record_func_map()
4947 record_func_key(struct bpf_verifier_env *env, struct bpf_call_arg_meta *meta, in record_func_key()
4985 static int check_reference_leak(struct bpf_verifier_env *env) in check_reference_leak()
4997 static int check_helper_call(struct bpf_verifier_env *env, int func_id, int insn_idx) in check_helper_call()
5288 static bool check_reg_sane_offset(struct bpf_verifier_env *env, in check_reg_sane_offset()
5323 static struct bpf_insn_aux_data *cur_aux(struct bpf_verifier_env *env) in cur_aux()
5359 static bool can_skip_alu_sanitation(const struct bpf_verifier_env *env, in can_skip_alu_sanitation()
5382 static int sanitize_val_alu(struct bpf_verifier_env *env, in sanitize_val_alu()
5393 static int sanitize_ptr_alu(struct bpf_verifier_env *env, in sanitize_ptr_alu()
5450 static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env, in adjust_ptr_min_max_vals()
6274 static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, in adjust_scalar_min_max_vals()
6443 static int adjust_reg_min_max_vals(struct bpf_verifier_env *env, in adjust_reg_min_max_vals()
6524 static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn) in check_alu_op()
7435 static int check_cond_jmp_op(struct bpf_verifier_env *env, in check_cond_jmp_op()
7609 static int check_ld_imm(struct bpf_verifier_env *env, struct bpf_insn *insn) in check_ld_imm()
7704 static int check_ld_abs(struct bpf_verifier_env *env, struct bpf_insn *insn) in check_ld_abs()
7781 static int check_return_code(struct bpf_verifier_env *env) in check_return_code()
7943 static u32 state_htab_size(struct bpf_verifier_env *env) in state_htab_size()
7949 struct bpf_verifier_env *env, in explored_state()
7958 static void init_explored_state(struct bpf_verifier_env *env, int idx) in init_explored_state()
7968 static int push_insn(int t, int w, int e, struct bpf_verifier_env *env, in push_insn()
8018 static int check_cfg(struct bpf_verifier_env *env) in check_cfg()
8142 static int check_abnormal_return(struct bpf_verifier_env *env) in check_abnormal_return()
8163 static int check_btf_func(struct bpf_verifier_env *env, in check_btf_func()
8292 static void adjust_btf_func(struct bpf_verifier_env *env) in adjust_btf_func()
8308 static int check_btf_line(struct bpf_verifier_env *env, in check_btf_line()
8430 static int check_btf_info(struct bpf_verifier_env *env, in check_btf_info()
8505 static void clean_func_state(struct bpf_verifier_env *env, in clean_func_state()
8534 static void clean_verifier_state(struct bpf_verifier_env *env, in clean_verifier_state()
8579 static void clean_live_states(struct bpf_verifier_env *env, int insn, in clean_live_states()
8845 static bool states_equal(struct bpf_verifier_env *env, in states_equal()
8878 static int propagate_liveness_reg(struct bpf_verifier_env *env, in propagate_liveness_reg()
8911 static int propagate_liveness(struct bpf_verifier_env *env, in propagate_liveness()
8958 static int propagate_precision(struct bpf_verifier_env *env, in propagate_precision()
9014 static int is_state_visited(struct bpf_verifier_env *env, int insn_idx) in is_state_visited()
9258 static int do_check(struct bpf_verifier_env *env) in do_check()
9582 static int check_pseudo_btf_id(struct bpf_verifier_env *env, in check_pseudo_btf_id()
9698 static int check_map_prog_compatibility(struct bpf_verifier_env *env, in check_map_prog_compatibility()
9785 static int resolve_pseudo_ldimm64(struct bpf_verifier_env *env) in resolve_pseudo_ldimm64()
9946 static void release_maps(struct bpf_verifier_env *env) in release_maps()
9953 static void convert_pseudo_ld_imm64(struct bpf_verifier_env *env) in convert_pseudo_ld_imm64()
9968 static int adjust_insn_aux_data(struct bpf_verifier_env *env, in adjust_insn_aux_data()
10001 static void adjust_subprog_starts(struct bpf_verifier_env *env, u32 off, u32 len) in adjust_subprog_starts()
10027 static struct bpf_prog *bpf_patch_insn_data(struct bpf_verifier_env *env, u32 off, in bpf_patch_insn_data()
10047 static int adjust_subprog_starts_after_remove(struct bpf_verifier_env *env, in adjust_subprog_starts_after_remove()
10103 static int bpf_adj_linfo_after_remove(struct bpf_verifier_env *env, u32 off, in bpf_adj_linfo_after_remove()
10167 static int verifier_remove_insns(struct bpf_verifier_env *env, u32 off, u32 cnt) in verifier_remove_insns()
10205 static void sanitize_dead_code(struct bpf_verifier_env *env) in sanitize_dead_code()
10234 static void opt_hard_wire_dead_code_branches(struct bpf_verifier_env *env) in opt_hard_wire_dead_code_branches()
10260 static int opt_remove_dead_code(struct bpf_verifier_env *env) in opt_remove_dead_code()
10284 static int opt_remove_nops(struct bpf_verifier_env *env) in opt_remove_nops()
10305 static int opt_subreg_zext_lo32_rnd_hi32(struct bpf_verifier_env *env, in opt_subreg_zext_lo32_rnd_hi32()
10388 static int convert_ctx_accesses(struct bpf_verifier_env *env) in convert_ctx_accesses()
10570 static int jit_subprogs(struct bpf_verifier_env *env) in jit_subprogs()
10799 static int fixup_call_args(struct bpf_verifier_env *env) in fixup_call_args()
10843 static int fixup_bpf_calls(struct bpf_verifier_env *env) in fixup_bpf_calls()
11196 static void free_states(struct bpf_verifier_env *env) in free_states()
11237 static void sanitize_insn_aux_data(struct bpf_verifier_env *env) in sanitize_insn_aux_data()
11254 static int do_check_common(struct bpf_verifier_env *env, int subprog) in do_check_common()
11346 static int do_check_subprogs(struct bpf_verifier_env *env) in do_check_subprogs()
11371 static int do_check_main(struct bpf_verifier_env *env) in do_check_main()
11383 static void print_verification_stats(struct bpf_verifier_env *env) in print_verification_stats()
11407 static int check_struct_ops_btf_id(struct bpf_verifier_env *env) in check_struct_ops_btf_id()
11734 static int check_attach_btf_id(struct bpf_verifier_env *env) in check_attach_btf_id()
11819 struct bpf_verifier_env *env; in bpf_check() local