函数逻辑报告 |
Source Code:kernel\bpf\core.c |
Create Date:2022-07-27 13:59:42 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:bpf_adj_branches
函数原型:static int bpf_adj_branches(struct bpf_prog *prog, u32 pos, s32 end_old, s32 end_new, const bool probe_pass)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct bpf_prog * | prog | |
| u32 | pos | |
| s32 | end_old | |
| s32 | end_new | |
| const bool | probe_pass |
| 377 | insn_cnt等于 Number of filter blocks 加如果probe_pass则end_new减end_old否则0 |
| 379 | ret等于0 |
| 388 | 如果probe_pass且i恒等于pos则 |
| 393 | 如果Instruction classes (code)不等于BPF_JMP且Instruction classes (code)不等于jmp mode in word width 或alu/jmp fields (code)恒等于unction return 则继续下一循环 |
| 398 | 如果alu/jmp fields (code)恒等于unction call 则 |
| 399 | 如果 source register 不等于when bpf_call->src_reg == BPF_PSEUDO_CALL, bpf_call->imm == pc-relative* offset to another bpf function则继续下一循环 |
| 401 | ret等于bpf_adj_delta_to_imm(insn, pos, end_old, end_new, i, probe_pass) |
| 403 | 否则 |
| 404 | ret等于bpf_adj_delta_to_off(insn, pos, end_old, end_new, i, probe_pass) |
| 411 | 返回:ret |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |