Lines Matching refs:cur
554 struct bpf_verifier_state *cur = env->cur_state; in func() local
556 return cur->frame[reg->frameno]; in func()
945 struct bpf_verifier_state *cur = env->cur_state; in pop_stack() local
952 if (cur) { in pop_stack()
953 err = copy_verifier_state(cur, &head->st); in pop_stack()
975 struct bpf_verifier_state *cur = env->cur_state; in push_stack() local
989 err = copy_verifier_state(&elem->st, cur); in push_stack()
1781 struct bpf_verifier_state *cur) in push_jmp_history() argument
1783 u32 cnt = cur->jmp_history_cnt; in push_jmp_history()
1787 p = krealloc(cur->jmp_history, cnt * sizeof(*p), GFP_USER); in push_jmp_history()
1792 cur->jmp_history = p; in push_jmp_history()
1793 cur->jmp_history_cnt = cnt; in push_jmp_history()
2482 struct bpf_func_state *cur; /* state of the current function */ in check_stack_write_fixed_off() local
2502 cur = env->cur_state->frame[env->cur_state->curframe]; in check_stack_write_fixed_off()
2504 reg = &cur->regs[value_regno]; in check_stack_write_fixed_off()
2552 if (state != cur && reg->type == PTR_TO_STACK) { in check_stack_write_fixed_off()
2621 struct bpf_func_state *cur; /* state of the current function */ in check_stack_write_var_off() local
2631 cur = env->cur_state->frame[env->cur_state->curframe]; in check_stack_write_var_off()
2632 ptr_reg = &cur->regs[ptr_regno]; in check_stack_write_var_off()
2636 value_reg = &cur->regs[value_regno]; in check_stack_write_var_off()
4419 struct bpf_verifier_state *cur = env->cur_state; in process_spin_lock() local
4457 if (cur->active_spin_lock) { in process_spin_lock()
4462 cur->active_spin_lock = reg->id; in process_spin_lock()
4464 if (!cur->active_spin_lock) { in process_spin_lock()
4468 if (cur->active_spin_lock != reg->id) { in process_spin_lock()
4472 cur->active_spin_lock = 0; in process_spin_lock()
8698 struct bpf_verifier_state *cur = env->cur_state; in explored_state() local
8699 struct bpf_func_state *state = cur->frame[cur->curframe]; in explored_state()
9209 struct bpf_reg_state *cur) in range_within() argument
9211 return old->umin_value <= cur->umin_value && in range_within()
9212 old->umax_value >= cur->umax_value && in range_within()
9213 old->smin_value <= cur->smin_value && in range_within()
9214 old->smax_value >= cur->smax_value && in range_within()
9215 old->u32_min_value <= cur->u32_min_value && in range_within()
9216 old->u32_max_value >= cur->u32_max_value && in range_within()
9217 old->s32_min_value <= cur->s32_min_value && in range_within()
9218 old->s32_max_value >= cur->s32_max_value; in range_within()
9239 idmap[i].cur = cur_id; in check_ids()
9243 return idmap[i].cur == cur_id; in check_ids()
9325 struct bpf_verifier_state *cur) in clean_live_states() argument
9335 sl->state.curframe != cur->curframe) in clean_live_states()
9337 for (i = 0; i <= cur->curframe; i++) in clean_live_states()
9338 if (sl->state.frame[i]->callsite != cur->frame[i]->callsite) in clean_live_states()
9466 struct bpf_func_state *cur, struct bpf_id_pair *idmap) in stacksafe() argument
9489 if (i >= cur->allocated_stack) in stacksafe()
9497 cur->stack[spi].slot_type[i % BPF_REG_SIZE] == STACK_ZERO) in stacksafe()
9500 cur->stack[spi].slot_type[i % BPF_REG_SIZE]) in stacksafe()
9512 &cur->stack[spi].spilled_ptr, idmap)) in stacksafe()
9528 static bool refsafe(struct bpf_func_state *old, struct bpf_func_state *cur) in refsafe() argument
9530 if (old->acquired_refs != cur->acquired_refs) in refsafe()
9532 return !memcmp(old->refs, cur->refs, in refsafe()
9563 struct bpf_func_state *cur) in func_states_equal() argument
9569 if (!regsafe(env, &old->regs[i], &cur->regs[i], in func_states_equal()
9573 if (!stacksafe(env, old, cur, env->idmap_scratch)) in func_states_equal()
9576 if (!refsafe(old, cur)) in func_states_equal()
9584 struct bpf_verifier_state *cur) in states_equal() argument
9588 if (old->curframe != cur->curframe) in states_equal()
9594 if (old->speculative && !cur->speculative) in states_equal()
9597 if (old->active_spin_lock != cur->active_spin_lock) in states_equal()
9604 if (old->frame[i]->callsite != cur->frame[i]->callsite) in states_equal()
9606 if (!func_states_equal(env, old->frame[i], cur->frame[i])) in states_equal()
9737 struct bpf_verifier_state *cur) in states_maybe_looping() argument
9740 int i, fr = cur->curframe; in states_maybe_looping()
9746 fcur = cur->frame[fr]; in states_maybe_looping()
9759 struct bpf_verifier_state *cur = env->cur_state, *new; in is_state_visited() local
9763 cur->last_insn_idx = env->prev_insn_idx; in is_state_visited()
9785 clean_live_states(env, insn_idx, cur); in is_state_visited()
9792 if (states_maybe_looping(&sl->state, cur) && in is_state_visited()
9793 states_equal(env, &sl->state, cur)) { in is_state_visited()
9815 if (states_equal(env, &sl->state, cur)) { in is_state_visited()
9827 err = propagate_liveness(env, &sl->state, cur); in is_state_visited()
9834 err = err ? : push_jmp_history(env, cur); in is_state_visited()
9888 return push_jmp_history(env, cur); in is_state_visited()
9891 return push_jmp_history(env, cur); in is_state_visited()
9912 mark_all_scalars_imprecise(env, cur); in is_state_visited()
9916 err = copy_verifier_state(new, cur); in is_state_visited()
9926 cur->parent = new; in is_state_visited()
9927 cur->first_insn_idx = insn_idx; in is_state_visited()
9928 clear_jmp_history(cur); in is_state_visited()
9944 for (j = 0; j <= cur->curframe; j++) { in is_state_visited()
9945 for (i = j < cur->curframe ? BPF_REG_6 : 0; i < BPF_REG_FP; i++) in is_state_visited()
9946 cur->frame[j]->regs[i].parent = &new->frame[j]->regs[i]; in is_state_visited()
9948 cur->frame[j]->regs[i].live = REG_LIVE_NONE; in is_state_visited()
9952 for (j = 0; j <= cur->curframe; j++) { in is_state_visited()
9953 struct bpf_func_state *frame = cur->frame[j]; in is_state_visited()