函数逻辑报告 |
Source Code:kernel\bpf\verifier.c |
Create Date:2022-07-27 14:16:58 |
| Last Modify:2022-05-19 20:02:10 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:check_btf_func
函数原型:static int check_btf_func(struct bpf_verifier_env *env, const union bpf_attr *attr, union bpf_attr __user *uattr)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct bpf_verifier_env * | env | |
| const union bpf_attr * | attr | |
| union bpf_attr __user * | uattr |
| 6669 | krec_size等于sizeof(structbpf_func_info) |
| 6671 | struct bpf_func_info_aux * info_aux = NULL |
| 6676 | prev_offset等于0 |
| 6677 | ret等于0 |
| 6680 | 如果非nfuncs则返回:0 |
| 6683 | 如果nfuncs不等于subprog_cnt则 |
| 6685 | 返回:负EINVAL |
| 6699 | urecord等于u64_to_user_ptr(func_info) |
| 6700 | min_size等于min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u32, krec_size, urec_size) |
| 6711 | 如果ret则 |
| 6720 | 转到:err_free |
| 6723 | 如果copy_from_user( & krecord[i], urecord, min_size)则 |
| 6729 | 如果i恒等于0则 |
| 6730 | 如果insn_off则 |
| 6737 | 否则如果insn_off小于等于prev_offset则 |
| 6738 | verbose(env, "same or smaller insn offset (%u) than previous func info record (%u)", insn_off, prev_offset) |
| 6742 | 转到:err_free |
| 6745 | 如果 insn idx of function entry point 不等于insn_off则 |
| 6748 | 转到:err_free |
| 6752 | type等于btf_type_by_id(btf, type_id) |
| 6759 | prev_offset等于insn_off |
| 6764 | func_info_cnt等于nfuncs |
| 6765 | func_info_aux等于info_aux |
| 6766 | 返回:0 |
| 6768 | err_free : |
| 6771 | 返回:ret |
| 名称 | 描述 |
|---|---|
| check_btf_info |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |