• Home
  • Raw
  • Download

Lines Matching refs:dst

1011 static void *copy_array(void *dst, const void *src, size_t n, size_t size, gfp_t flags)  in copy_array()  argument
1014 void *orig = dst; in copy_array()
1024 dst = krealloc(orig, alloc_bytes, flags); in copy_array()
1025 if (!dst) { in copy_array()
1030 memcpy(dst, src, bytes); in copy_array()
1032 return dst ? dst : ZERO_SIZE_PTR; in copy_array()
1063 static int copy_reference_state(struct bpf_func_state *dst, const struct bpf_func_state *src) in copy_reference_state() argument
1065 dst->refs = copy_array(dst->refs, src->refs, src->acquired_refs, in copy_reference_state()
1067 if (!dst->refs) in copy_reference_state()
1070 dst->acquired_refs = src->acquired_refs; in copy_reference_state()
1074 static int copy_stack_state(struct bpf_func_state *dst, const struct bpf_func_state *src) in copy_stack_state() argument
1078 dst->stack = copy_array(dst->stack, src->stack, n, sizeof(struct bpf_stack_state), in copy_stack_state()
1080 if (!dst->stack) in copy_stack_state()
1083 dst->allocated_stack = src->allocated_stack; in copy_stack_state()
1190 static int copy_func_state(struct bpf_func_state *dst, in copy_func_state() argument
1195 memcpy(dst, src, offsetof(struct bpf_func_state, acquired_refs)); in copy_func_state()
1196 err = copy_reference_state(dst, src); in copy_func_state()
1199 return copy_stack_state(dst, src); in copy_func_state()
1205 struct bpf_func_state *dst; in copy_verifier_state() local
1228 dst = dst_state->frame[i]; in copy_verifier_state()
1229 if (!dst) { in copy_verifier_state()
1230 dst = kzalloc(sizeof(*dst), GFP_KERNEL); in copy_verifier_state()
1231 if (!dst) in copy_verifier_state()
1233 dst_state->frame[i] = dst; in copy_verifier_state()
1235 err = copy_func_state(dst, src->frame[i]); in copy_verifier_state()
3215 static void copy_register_state(struct bpf_reg_state *dst, const struct bpf_reg_state *src) in copy_register_state() argument
3217 struct bpf_reg_state *parent = dst->parent; in copy_register_state()
3218 enum bpf_reg_liveness live = dst->live; in copy_register_state()
3220 *dst = *src; in copy_register_state()
3221 dst->parent = parent; in copy_register_state()
3222 dst->live = live; in copy_register_state()
8376 u32 dst = insn->dst_reg, src = insn->src_reg; in sanitize_err() local
8381 off_reg == dst_reg ? dst : src, err); in sanitize_err()
8385 off_reg == dst_reg ? src : dst, err); in sanitize_err()
8389 dst, op, err); in sanitize_err()
8393 dst, op, err); in sanitize_err()
8397 dst, err); in sanitize_err()
8446 u32 dst = insn->dst_reg; in sanitize_check_bounds() local
8456 if (check_stack_access_for_ptr_arithmetic(env, dst, dst_reg, in sanitize_check_bounds()
8461 if (check_map_access(env, dst, dst_reg->off, 1, false, ACCESS_HELPER)) { in sanitize_check_bounds()
8463 "prohibited for !root\n", dst); in sanitize_check_bounds()
8494 u32 dst = insn->dst_reg; in adjust_ptr_min_max_vals() local
8497 dst_reg = &regs[dst]; in adjust_ptr_min_max_vals()
8517 dst); in adjust_ptr_min_max_vals()
8523 dst, reg_type_str(env, ptr_reg->type)); in adjust_ptr_min_max_vals()
8543 dst, reg_type_str(env, ptr_reg->type)); in adjust_ptr_min_max_vals()
8624 dst); in adjust_ptr_min_max_vals()
8633 dst); in adjust_ptr_min_max_vals()
8685 dst, bpf_alu_string[opcode >> 4]); in adjust_ptr_min_max_vals()
8690 dst, bpf_alu_string[opcode >> 4]); in adjust_ptr_min_max_vals()