| Function report | 
| Source Code: kernel\bpf\verifier.c | Create Date:2022-07-28 13:03:24 | 
| Last Modify:2022-05-19 20:02:10 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:is_state_visited
Proto:static int is_state_visited(struct bpf_verifier_env *env, int insn_idx)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct bpf_verifier_env * | env | |
| int | insn_idx | 
| 7497 | cur = current verifier state | 
| 7498 | states_cnt = 0 | 
| 7499 | bool add_new_state = st verifier with different pruning frequency ? true : false | 
| 7501 | last_insn_idx = prev_insn_idx | 
| 7502 | If Not prune_point Then Return 0 | 
| 7520 | pprev = explored_state(env, insn_idx) | 
| 7526 | states_cnt++ | 
| 7530 | If states_maybe_looping( & state, cur) && states_equal(env, & state, cur) Then | 
| 7532 | verbose_linfo(env, insn_idx, "; ") | 
| 7534 | Return -EINVAL | 
| 7551 | Go to miss | 
| 7553 | If states_equal(env, & state, cur) Then | 
| 7554 | hit_cnt++ | 
| 7565 | err = A write screens off any subsequent reads; but write marks come from the* straight-line code between a state and its parent | 
| 7573 | err = If err Else d precise scalars in the previous equivalent state and* propagate them into the current state | 
| 7576 | Return 1 | 
| 7578 | miss : | 
| 7585 | If add_new_state Then miss_cnt++ | 
| 7597 | If live & liveness won't be updating this register anymore Then | 
| 7603 | free_verifier_state( & state, false) | 
| 7606 | Else | 
| 7615 | Continue | 
| 7617 | next : | 
| 7622 | If maximum number of verifier states kept in 'branching' instructions < states_cnt Then maximum number of verifier states kept in 'branching' instructions = states_cnt | 
| 7625 | If Not allow_ptr_leaks && states_cnt > BPF_COMPLEXITY_LIMIT_STATES Then Return r any branch, call, exit record the history of jmps in the given state | 
| 7628 | If Not add_new_state Then Return r any branch, call, exit record the history of jmps in the given state | 
| 7640 | new_sl = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). | 
| 7646 | umber of instructions analyzed by the verifier = umber of instructions analyzed by the verifier | 
| 7650 | err = copy_verifier_state(new, cur) | 
| 7651 | If err Then | 
| 7662 | clear_jmp_history(cur) | 
| 7663 | next = explored_state(env, insn_idx) | 
| 7664 | explored_state(env, insn_idx) = new_sl | 
| 7679 | When i < BPF_REG_FP cycle parentage chain for liveness checking = regs[i] | 
| 7681 | When i < BPF_REG_FP cycle live = g hasn't been read or written this branch | 
| 7687 | frame = call stack tracking [j] | 
| 7688 | newframe = call stack tracking [j] | 
| 7690 | When i < allocated_stack / size of eBPF register in bytes cycle | 
| 7696 | Return 0 | 
| Name | Describe | 
|---|---|
| do_check | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |