函数逻辑报告 |
Source Code:kernel\bpf\verifier.c |
Create Date:2022-07-27 14:17:55 |
Last Modify:2022-05-19 20:02:10 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:is_state_visited
函数原型:static int is_state_visited(struct bpf_verifier_env *env, int insn_idx)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
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 | 如果非prune_point则返回:0 |
7520 | pprev等于explored_state(env, insn_idx) |
7526 | states_cnt自加 |
7530 | 如果states_maybe_looping( & state, cur)且states_equal(env, & state, cur)则 |
7532 | verbose_linfo(env, insn_idx, "; ") |
7534 | 返回:负EINVAL |
7551 | 转到:miss |
7553 | 如果states_equal(env, & state, cur)则 |
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等于如果err否则d precise scalars in the previous equivalent state and* propagate them into the current state |
7576 | 返回:1 |
7578 | miss : |
7585 | 如果add_new_state则miss_cnt自加 |
7603 | free_verifier_state( & state, false) |
7606 | 否则 |
7615 | 继续下一循环 |
7617 | next : |
7622 | 如果maximum number of verifier states kept in 'branching' instructions 小于states_cnt则maximum number of verifier states kept in 'branching' instructions 等于states_cnt |
7625 | 如果非allow_ptr_leaks且states_cnt大于BPF_COMPLEXITY_LIMIT_STATES则返回:r any branch, call, exit record the history of jmps in the given state |
7646 | umber of instructions analyzed by the verifier 等于umber of instructions analyzed by the verifier |
7650 | err等于copy_verifier_state(new, cur) |
7651 | 如果err则 |
7662 | clear_jmp_history(cur) |
7663 | next等于explored_state(env, insn_idx) |
7664 | explored_state(env, insn_idx)等于new_sl |
7679 | 以i小于BPF_REG_FP循环 parentage chain for liveness checking 等于regs[i] |
7687 | frame等于 call stack tracking [j] |
7688 | newframe等于 call stack tracking [j] |
7696 | 返回:0 |
名称 | 描述 |
---|---|
do_check |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |