函数逻辑报告 |
Source Code:kernel\bpf\verifier.c |
Create Date:2022-07-27 14:16:39 |
Last Modify:2022-05-19 20:02:10 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:, w, e - match pseudo-code above:
函数原型:static int push_insn(int t, int w, int e, struct bpf_verifier_env *env, bool loop_ok)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
int | t | index of current instruction |
int | w | next instruction |
int | e | edge |
struct bpf_verifier_env * | env | |
bool | loop_ok |
6489 | insn_stack等于insn_stack |
6490 | insn_state等于insn_state |
6492 | 如果 edge恒等于FALLTHROUGH且insn_state[ index of current instruction]大于等于DISCOVERED按位或FALLTHROUGH的值则返回:0 |
6495 | 如果 edge恒等于BRANCH且insn_state[ index of current instruction]大于等于DISCOVERED按位或BRANCH的值则返回:0 |
6498 | 如果 next instruction小于0或 next instruction大于等于 Number of filter blocks 则 |
6499 | verbose_linfo(env, index of current instruction, "%d: ", index of current instruction) |
6500 | verbose(env, "jump out of range from insn %d to %d\n", index of current instruction, next instruction) |
6501 | 返回:负EINVAL |
6504 | 如果 edge恒等于BRANCH则init_explored_state(env, next instruction) |
6508 | 如果insn_state[ next instruction]恒等于0则 |
6510 | insn_state[ index of current instruction]等于DISCOVERED按位或 edge |
6511 | insn_state[ next instruction]等于DISCOVERED |
6512 | 如果cur_stack大于等于 Number of filter blocks 则返回:负E2BIG |
6514 | insn_stack[cur_stack++]等于 next instruction |
6515 | 返回:1 |
6516 | 否则如果insn_state[ next instruction]按位与0xF0的值恒等于DISCOVERED则 |
6517 | 如果loop_ok且allow_ptr_leaks则返回:0 |
6519 | verbose_linfo(env, index of current instruction, "%d: ", index of current instruction) |
6520 | verbose_linfo(env, next instruction, "%d: ", next instruction) |
6521 | verbose(env, "back-edge from insn %d to %d\n", index of current instruction, next instruction) |
6522 | 返回:负EINVAL |
6523 | 否则如果insn_state[ next instruction]恒等于EXPLORED则 |
6525 | insn_state[ index of current instruction]等于DISCOVERED按位或 edge |
6526 | 否则 |
6530 | 返回:0 |
名称 | 描述 |
---|---|
check_cfg | -recursive depth-first-search to detect loops in BPF program* loop == back-edge in directed graph |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |