• Home
  • Raw
  • Download

Lines Matching refs:cur

428 	struct bpf_verifier_state *cur = env->cur_state;  in func()  local
430 return cur->frame[reg->frameno]; in func()
779 struct bpf_verifier_state *cur = env->cur_state; in pop_stack() local
786 if (cur) { in pop_stack()
787 err = copy_verifier_state(cur, &head->st); in pop_stack()
807 struct bpf_verifier_state *cur = env->cur_state; in push_stack() local
820 err = copy_verifier_state(&elem->st, cur); in push_stack()
1417 struct bpf_verifier_state *cur) in push_jmp_history() argument
1419 u32 cnt = cur->jmp_history_cnt; in push_jmp_history()
1423 p = krealloc(cur->jmp_history, cnt * sizeof(*p), GFP_USER); in push_jmp_history()
1428 cur->jmp_history = p; in push_jmp_history()
1429 cur->jmp_history_cnt = cnt; in push_jmp_history()
1900 struct bpf_func_state *cur; /* state of the current function */ in check_stack_write() local
1919 cur = env->cur_state->frame[env->cur_state->curframe]; in check_stack_write()
1921 reg = &cur->regs[value_regno]; in check_stack_write()
1945 if (state != cur && reg->type == PTR_TO_STACK) { in check_stack_write()
3146 struct bpf_verifier_state *cur = env->cur_state; in process_spin_lock() local
3188 if (cur->active_spin_lock) { in process_spin_lock()
3193 cur->active_spin_lock = reg->id; in process_spin_lock()
3195 if (!cur->active_spin_lock) { in process_spin_lock()
3199 if (cur->active_spin_lock != reg->id) { in process_spin_lock()
3203 cur->active_spin_lock = 0; in process_spin_lock()
6240 struct bpf_verifier_state *cur = env->cur_state; in explored_state() local
6241 struct bpf_func_state *state = cur->frame[cur->curframe]; in explored_state()
6704 struct bpf_reg_state *cur) in range_within() argument
6706 return old->umin_value <= cur->umin_value && in range_within()
6707 old->umax_value >= cur->umax_value && in range_within()
6708 old->smin_value <= cur->smin_value && in range_within()
6709 old->smax_value >= cur->smax_value; in range_within()
6716 u32 cur; member
6737 idmap[i].cur = cur_id; in check_ids()
6741 return idmap[i].cur == cur_id; in check_ids()
6823 struct bpf_verifier_state *cur) in clean_live_states() argument
6833 sl->state.curframe != cur->curframe) in clean_live_states()
6835 for (i = 0; i <= cur->curframe; i++) in clean_live_states()
6836 if (sl->state.frame[i]->callsite != cur->frame[i]->callsite) in clean_live_states()
6962 struct bpf_func_state *cur, in stacksafe() argument
6986 if (i >= cur->allocated_stack) in stacksafe()
6994 cur->stack[spi].slot_type[i % BPF_REG_SIZE] == STACK_ZERO) in stacksafe()
6997 cur->stack[spi].slot_type[i % BPF_REG_SIZE]) in stacksafe()
7009 &cur->stack[spi].spilled_ptr, in stacksafe()
7026 static bool refsafe(struct bpf_func_state *old, struct bpf_func_state *cur) in refsafe() argument
7028 if (old->acquired_refs != cur->acquired_refs) in refsafe()
7030 return !memcmp(old->refs, cur->refs, in refsafe()
7061 struct bpf_func_state *cur) in func_states_equal() argument
7073 if (!regsafe(&old->regs[i], &cur->regs[i], idmap)) in func_states_equal()
7077 if (!stacksafe(old, cur, idmap)) in func_states_equal()
7080 if (!refsafe(old, cur)) in func_states_equal()
7090 struct bpf_verifier_state *cur) in states_equal() argument
7094 if (old->curframe != cur->curframe) in states_equal()
7100 if (old->speculative && !cur->speculative) in states_equal()
7103 if (old->active_spin_lock != cur->active_spin_lock) in states_equal()
7110 if (old->frame[i]->callsite != cur->frame[i]->callsite) in states_equal()
7112 if (!func_states_equal(old->frame[i], cur->frame[i])) in states_equal()
7239 struct bpf_verifier_state *cur) in states_maybe_looping() argument
7242 int i, fr = cur->curframe; in states_maybe_looping()
7248 fcur = cur->frame[fr]; in states_maybe_looping()
7261 struct bpf_verifier_state *cur = env->cur_state, *new; in is_state_visited() local
7265 cur->last_insn_idx = env->prev_insn_idx; in is_state_visited()
7287 clean_live_states(env, insn_idx, cur); in is_state_visited()
7294 if (states_maybe_looping(&sl->state, cur) && in is_state_visited()
7295 states_equal(env, &sl->state, cur)) { in is_state_visited()
7317 if (states_equal(env, &sl->state, cur)) { in is_state_visited()
7329 err = propagate_liveness(env, &sl->state, cur); in is_state_visited()
7336 err = err ? : push_jmp_history(env, cur); in is_state_visited()
7390 return push_jmp_history(env, cur); in is_state_visited()
7393 return push_jmp_history(env, cur); in is_state_visited()
7414 err = copy_verifier_state(new, cur); in is_state_visited()
7424 cur->parent = new; in is_state_visited()
7425 cur->first_insn_idx = insn_idx; in is_state_visited()
7426 clear_jmp_history(cur); in is_state_visited()
7442 for (j = 0; j <= cur->curframe; j++) { in is_state_visited()
7443 for (i = j < cur->curframe ? BPF_REG_6 : 0; i < BPF_REG_FP; i++) in is_state_visited()
7444 cur->frame[j]->regs[i].parent = &new->frame[j]->regs[i]; in is_state_visited()
7446 cur->frame[j]->regs[i].live = REG_LIVE_NONE; in is_state_visited()
7450 for (j = 0; j <= cur->curframe; j++) { in is_state_visited()
7451 struct bpf_func_state *frame = cur->frame[j]; in is_state_visited()