• Home
  • Raw
  • Download

Lines Matching refs:dst

764 static void *copy_array(void *dst, const void *src, size_t n, size_t size, gfp_t flags)  in copy_array()  argument
774 if (ksize(dst) < bytes) { in copy_array()
775 kfree(dst); in copy_array()
776 dst = kmalloc_track_caller(bytes, flags); in copy_array()
777 if (!dst) in copy_array()
781 memcpy(dst, src, bytes); in copy_array()
783 return dst ? dst : ZERO_SIZE_PTR; in copy_array()
812 static int copy_reference_state(struct bpf_func_state *dst, const struct bpf_func_state *src) in copy_reference_state() argument
814 dst->refs = copy_array(dst->refs, src->refs, src->acquired_refs, in copy_reference_state()
816 if (!dst->refs) in copy_reference_state()
819 dst->acquired_refs = src->acquired_refs; in copy_reference_state()
823 static int copy_stack_state(struct bpf_func_state *dst, const struct bpf_func_state *src) in copy_stack_state() argument
827 dst->stack = copy_array(dst->stack, src->stack, n, sizeof(struct bpf_stack_state), in copy_stack_state()
829 if (!dst->stack) in copy_stack_state()
832 dst->allocated_stack = src->allocated_stack; in copy_stack_state()
939 static int copy_func_state(struct bpf_func_state *dst, in copy_func_state() argument
944 memcpy(dst, src, offsetof(struct bpf_func_state, acquired_refs)); in copy_func_state()
945 err = copy_reference_state(dst, src); in copy_func_state()
948 return copy_stack_state(dst, src); in copy_func_state()
954 struct bpf_func_state *dst; in copy_verifier_state() local
977 dst = dst_state->frame[i]; in copy_verifier_state()
978 if (!dst) { in copy_verifier_state()
979 dst = kzalloc(sizeof(*dst), GFP_KERNEL); in copy_verifier_state()
980 if (!dst) in copy_verifier_state()
982 dst_state->frame[i] = dst; in copy_verifier_state()
984 err = copy_func_state(dst, src->frame[i]); in copy_verifier_state()
2792 static void copy_register_state(struct bpf_reg_state *dst, const struct bpf_reg_state *src) in copy_register_state() argument
2794 struct bpf_reg_state *parent = dst->parent; in copy_register_state()
2795 enum bpf_reg_liveness live = dst->live; in copy_register_state()
2797 *dst = *src; in copy_register_state()
2798 dst->parent = parent; in copy_register_state()
2799 dst->live = live; in copy_register_state()
7147 u32 dst = insn->dst_reg, src = insn->src_reg; in sanitize_err() local
7152 off_reg == dst_reg ? dst : src, err); in sanitize_err()
7156 off_reg == dst_reg ? src : dst, err); in sanitize_err()
7160 dst, op, err); in sanitize_err()
7164 dst, op, err); in sanitize_err()
7168 dst, err); in sanitize_err()
7217 u32 dst = insn->dst_reg; in sanitize_check_bounds() local
7227 if (check_stack_access_for_ptr_arithmetic(env, dst, dst_reg, in sanitize_check_bounds()
7232 if (check_map_access(env, dst, dst_reg->off, 1, false)) { in sanitize_check_bounds()
7234 "prohibited for !root\n", dst); in sanitize_check_bounds()
7265 u32 dst = insn->dst_reg; in adjust_ptr_min_max_vals() local
7268 dst_reg = &regs[dst]; in adjust_ptr_min_max_vals()
7288 dst); in adjust_ptr_min_max_vals()
7294 dst, reg_type_str(env, ptr_reg->type)); in adjust_ptr_min_max_vals()
7315 dst, reg_type_str(env, ptr_reg->type)); in adjust_ptr_min_max_vals()
7398 dst); in adjust_ptr_min_max_vals()
7407 dst); in adjust_ptr_min_max_vals()
7459 dst, bpf_alu_string[opcode >> 4]); in adjust_ptr_min_max_vals()
7464 dst, bpf_alu_string[opcode >> 4]); in adjust_ptr_min_max_vals()