函数逻辑报告 |
Source Code:kernel\bpf\verifier.c |
Create Date:2022-07-27 14:12:07 |
Last Modify:2022-05-19 20:02:10 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:check_ptr_to_btf_access
函数原型:static int check_ptr_to_btf_access(struct bpf_verifier_env *env, struct bpf_reg_state *regs, int regno, int off, int size, enum bpf_access_type atype, int value_regno)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct bpf_verifier_env * | env | |
struct bpf_reg_state * | regs | |
int | regno | |
int | off | |
int | size | |
enum bpf_access_type | atype | |
int | value_regno |
2856 | t等于btf_type_by_id(btf_vmlinux, for PTR_TO_BTF_ID ) |
2857 | tname等于btf_name_by_offset(btf_vmlinux, name_off) |
2866 | 如果off小于0则 |
2870 | 返回:负EACCES |
2872 | 如果非Returns true if @a is a known constant 或value则 |
2876 | verbose(env, "R%d is ptr_%s invalid variable offset: off=%d, var_off=%s\n", regno, tname, off, tn_buf) |
2879 | 返回:负EACCES |
2886 | 如果ret恒等于g doesn't contain a valid pointer 则 |
2887 | mark_reg_unknown(env, regs, value_regno) |
2888 | 返回:0 |
2890 | mark_reg_known_zero(env, regs, value_regno) |
2892 | for PTR_TO_BTF_ID 等于btf_id |
2893 | 返回:0 |
名称 | 描述 |
---|---|
check_mem_access | heck whether memory at (regno + off) is accessible for t = (read | write)* if t==write, value_regno is a register which value is stored into memory* if t==read, value_regno is a register which will receive the value from memory* if t==write && |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |