Lines Matching +full:pre +full:- +full:verified

1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com
24 /* Liveness marks, used for registers and spilled-regs (in stack slots).
29 * straight-line code that reached this state (from its parent) wrote this reg"
40 REG_LIVE_READ64 = 0x2, /* likewise, but full 64-bit content matters */
61 * the map_uid is non-zero for registers
108 * from a pointer-cast helper, bpf_sk_fullsock() and
121 * 8: snd_cwnd = tp->snd_cwnd; // verifier will complain
126 * the original refcounted ptr id (i.e. sk_reg->id) in ref_obj_id
128 * ref_obj_id matching the sk_reg->id.
130 * sk_reg->ref_obj_id is set to sk_reg->id at line 1.
131 * sk_reg->id will stay as NULL-marking purpose only.
132 * After NULL-marking is done, sk_reg->id can be reset to 0.
135 * fullsock_reg->ref_obj_id is set to sk_reg->ref_obj_id.
138 * tp_reg->ref_obj_id is set to fullsock_reg->ref_obj_id
139 * which is the same as sk_reg->ref_obj_id.
143 * reg->type. In particular, bpf_sk_release(tp) is also
150 * from the pointed-to object, and is shared with all bpf_reg_states
170 * R1=fp-8 and R2=fp-8, but one of them points to this function stack
172 * is used which is an index in bpf_verifier_state->frame[] array
192 * is stored in bpf_stack_state->spilled_ptr.dynptr.type
280 * 0 - all possible paths from this state reached bpf_exit or
282 * 1 - at least one path is being explored.
284 * 2 - at least two paths are being explored.
292 * 2 -> 1 (first 'if' pushed into stack)
294 * 2 -> 1 (second 'if' pushed into stack)
303 * 2 -> 1 (first 'if' pushed into stack)
305 * 1 -> 1 (second 'if' pushed into stack)
316 * states_maybe_looping() function. It's a stronger pre-check and
334 * For most states jmp_history_cnt is [0-3].
342 (((slot < frame->allocated_stack / BPF_REG_SIZE) && \
343 (frame->stack[slot].slot_type[0] == STACK_SPILL)) \
344 ? &frame->stack[slot].spilled_ptr : NULL)
349 iter < frame->allocated_stack / BPF_REG_SIZE; \
357 for (___i = 0; ___i <= ___vstate->curframe; ___i++) { \
359 __state = ___vstate->frame[___i]; \
360 ___regs = __state->regs; \
414 u32 mem_size; /* mem_size for non-struct typed var */
424 u32 seen; /* this insn was processed by the verifier at env->pass_cnt */
449 return log->len_used >= log->len_total - 1; in bpf_verifier_log_full()
464 ((log->level && log->ubuf && !bpf_verifier_log_full(log)) || in bpf_verifier_log_needed()
465 log->level == BPF_LOG_KERNEL); in bpf_verifier_log_needed()
471 return log->len_total >= 128 && log->len_total <= UINT_MAX >> 2 && in bpf_verifier_log_attr_valid()
472 log->level && log->ubuf && !(log->level & ~BPF_LOG_MASK); in bpf_verifier_log_attr_valid()
480 u32 linfo_idx; /* The idx to the main_prog->aux->linfo */
494 struct bpf_prog *prog; /* eBPF program being verified */
516 struct bpf_insn_aux_data *insn_aux_data; /* array of per-insn state */
567 struct bpf_verifier_state *cur = env->cur_state; in cur_func()
569 return cur->frame[cur->curframe]; in cur_func()
574 return cur_func(env)->regs; in cur_regs()
607 return ((u64)tgt_prog->aux->id << 32) | btf_id; in bpf_trampoline_compute_key()
630 #define BPF_BASE_TYPE_MASK GENMASK(BPF_BASE_TYPE_BITS - 1, 0)
647 return prog->type == BPF_PROG_TYPE_EXT ? in resolve_prog_type()
648 prog->aux->dst_prog->type : prog->type; in resolve_prog_type()