Lines Matching refs:spi
1807 u32 spi;
1874 spi = (-insn->off - 1) / BPF_REG_SIZE;
1875 if (spi >= VERIFIER_SIXTYFOUR) {
1876 verbose(env, "BUG spi %d\n", spi);
1880 *stack_mask |= 1ull << spi;
1896 spi = (-insn->off - 1) / BPF_REG_SIZE;
1897 if (spi >= VERIFIER_SIXTYFOUR) {
1898 verbose(env, "BUG spi %d\n", spi);
1902 if (!(*stack_mask & (1ull << spi))) {
1905 *stack_mask &= ~(1ull << spi);
2029 static int __mark_chain_precision(struct bpf_verifier_env *env, int regno, int spi)
2037 u64 stack_mask = spi >= 0 ? 1ull << spi : 0;
2061 while (spi >= 0) {
2062 if (func->stack[spi].slot_type[0] != STACK_SPILL) {
2066 reg = &func->stack[spi].spilled_ptr;
2209 static int mark_chain_precision_stack(struct bpf_verifier_env *env, int spi)
2211 return __mark_chain_precision(env, -1, spi);
2271 static void save_register_state(struct bpf_func_state *state, int spi, struct bpf_reg_state *reg)
2275 state->stack[spi].spilled_ptr = *reg;
2276 state->stack[spi].spilled_ptr.live |= REG_LIVE_WRITTEN;
2279 state->stack[spi].slot_type[i] = STACK_SPILL;
2291 int i, slot = -off - 1, spi = slot / BPF_REG_SIZE, err;
2302 if (!env->allow_ptr_leaks && state->stack[spi].slot_type[0] == STACK_SPILL && size != BPF_REG_SIZE) {
2315 if (state->stack[spi].slot_type[i] == STACK_INVALID) {
2339 save_register_state(state, spi, reg);
2351 save_register_state(state, spi, reg);
2356 state->stack[spi].spilled_ptr.type = NOT_INIT;
2358 if (state->stack[spi].slot_type[0] == STACK_SPILL) {
2360 state->stack[spi].slot_type[i] = STACK_MISC;
2373 state->stack[spi].spilled_ptr.live |= REG_LIVE_WRITTEN;
2388 state->stack[spi].slot_type[(slot - i) % BPF_REG_SIZE] = type;
2447 int slot, spi;
2450 spi = slot / BPF_REG_SIZE;
2451 stype = &state->stack[spi].slot_type[slot % BPF_REG_SIZE];
2465 state->stack[spi].spilled_ptr.type = NOT_INIT;
2512 int i, slot, spi;
2518 spi = slot / BPF_REG_SIZE;
2519 stype = ptr_state->stack[spi].slot_type;
2563 int i, slot = -off - 1, spi = slot / BPF_REG_SIZE;
2567 stype = reg_state->stack[spi].slot_type;
2568 reg = ®_state->stack[spi].spilled_ptr;
3953 int err, min_off, max_off, i, j, slot, spi;
4021 spi = slot / BPF_REG_SIZE;
4025 stype = &state->stack[spi].slot_type[slot % BPF_REG_SIZE];
4037 if (state->stack[spi].slot_type[0] == STACK_SPILL && state->stack[spi].spilled_ptr.type == PTR_TO_BTF_ID) {
4041 if (state->stack[spi].slot_type[0] == STACK_SPILL &&
4042 (state->stack[spi].spilled_ptr.type == SCALAR_VALUE || env->allow_ptr_leaks)) {
4044 __mark_reg_unknown(env, &state->stack[spi].spilled_ptr);
4046 state->stack[spi].slot_type[j] = STACK_MISC;
4068 mark_reg_read(env, &state->stack[spi].spilled_ptr, state->stack[spi].spilled_ptr.parent, REG_LIVE_READ64);
9112 int i, spi;
9119 spi = i / BPF_REG_SIZE;
9121 if (!(old->stack[spi].spilled_ptr.live & REG_LIVE_READ)) {
9127 if (old->stack[spi].slot_type[i % BPF_REG_SIZE] == STACK_INVALID) {
9142 if (old->stack[spi].slot_type[i % BPF_REG_SIZE] == STACK_MISC &&
9143 cur->stack[spi].slot_type[i % BPF_REG_SIZE] == STACK_ZERO) {
9146 if (old->stack[spi].slot_type[i % BPF_REG_SIZE] != cur->stack[spi].slot_type[i % BPF_REG_SIZE]) {
9157 if (old->stack[spi].slot_type[0] != STACK_SPILL) {
9160 if (!regsafe(env, &old->stack[spi].spilled_ptr, &cur->stack[spi].spilled_ptr, idmap)) {