函数逻辑报告 |
Source Code:kernel\bpf\verifier.c |
Create Date:2022-07-27 14:16:15 |
Last Modify:2022-05-19 20:02:10 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:check_cond_jmp_op
函数原型:static int check_cond_jmp_op(struct bpf_verifier_env *env, struct bpf_insn *insn, int *insn_idx)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct bpf_verifier_env * | env | |
struct bpf_insn * | insn | |
int * | insn_idx |
6047 | struct bpf_reg_state * dst_reg, * other_branch_regs, * src_reg = NULL |
6048 | opcode等于alu/jmp fields ( opcode ) |
6050 | pred等于负1 |
6054 | 如果opcode恒等于BPF_JA或opcode大于SLE is signed, '<=' 则 |
6060 | 如果 signed immediate constant 不等于0则 |
6070 | 如果is_pointer_value(env, source register )则 |
6071 | verbose(env, "R%d pointer comparison prohibited\n", source register ) |
6073 | 返回:负EACCES |
6075 | src_reg等于regs[ source register ] |
6076 | 否则 |
6077 | 如果 source register 不等于BPF_REG_0则 |
6088 | dst_reg等于regs[ dest register ] |
6089 | is_jmp32等于Instruction classes ( opcode )恒等于jmp mode in word width |
6098 | 如果pred大于等于0则 |
6099 | err等于mark_chain_precision(env, dest register ) |
6100 | 如果BPF_SRC( opcode )恒等于BPF_X且非err则err等于mark_chain_precision(env, source register ) |
6105 | 如果pred恒等于1则 |
6107 | insn_idx加等于 signed offset |
6108 | 返回:0 |
6109 | 否则如果pred恒等于0则 |
6113 | 返回:0 |
6116 | other_branch等于push_stack(env, * insn_idx + signed offset + 1, * insn_idx, false) |
6118 | 如果非other_branch则返回:负EFAULT |
6120 | other_branch_regs等于regs |
6130 | src_reg等于regs[ source register ] |
6150 | 否则如果Returns true if @a is a known constant 或is_jmp32且Returns true if @a is a known constant 则Same as above, but for the case that dst_reg holds a constant and src_reg is* the variable reg. |
6158 | 否则如果非is_jmp32且opcode恒等于BPF_JEQ或opcode恒等于jump != 的值则reg_combine_min_max( & other_branch_regs[ source register ], & other_branch_regs[ dest register ], src_reg, dst_reg, opcode) |
6174 | 如果非is_jmp32且BPF_SRC( opcode )恒等于BPF_K且 signed immediate constant 恒等于0且opcode恒等于BPF_JEQ或opcode恒等于jump != 的值且reg_type_may_be_null( Ordering of fields matters. See states_equal() )则 |
6184 | 否则如果非try_match_pkt_pointers(insn, dst_reg, & regs[ source register ], this_branch, other_branch)且is_pointer_value(env, dest register )则 |
6187 | verbose(env, "R%d pointer comparison prohibited\n", dest register ) |
6189 | 返回:负EACCES |
6191 | 如果level按位与BPF_LOG_LEVEL则print_verifier_state(env, call stack tracking [curframe]) |
6193 | 返回:0 |
名称 | 描述 |
---|---|
do_check |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |