函数逻辑报告 |
Source Code:kernel\bpf\verifier.c |
Create Date:2022-07-27 14:14:59 |
Last Modify:2022-05-19 20:02:10 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Handles ALU ops other than BPF_END, BPF_NEG and BPF_MOV: computes new min/max* and var_off.
函数原型:static int adjust_reg_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct bpf_verifier_env * | env | |
struct bpf_insn * | insn |
5091 | vstate等于current verifier state |
5092 | state等于 call stack tracking [curframe] |
5094 | struct bpf_reg_state * ptr_reg = NULL, off_reg = {0} |
5095 | opcode等于alu/jmp fields ( opcode ) |
5098 | dst_reg等于regs[ dest register ] |
5099 | src_reg = NULL |
5100 | 如果 Ordering of fields matters. See states_equal() 不等于g doesn't contain a valid pointer 则ptr_reg等于dst_reg |
5103 | src_reg等于regs[ source register ] |
5110 | 如果opcode恒等于BPF_SUB且allow_ptr_leaks则 |
5111 | mark_reg_unknown(env, regs, dest register ) |
5112 | 返回:0 |
5114 | verbose(env, "R%d pointer %s pointer prohibited\n", dest register , bpf_alu_string[opcode >> 4]) |
5117 | 返回:负EACCES |
5118 | 否则 |
5129 | 否则如果ptr_reg则 |
5137 | 否则 |
5150 | 如果WARN_ON_ONCE(ptr_reg)则 |
5151 | print_verifier_state(env, state) |
5153 | 返回:负EINVAL |
5156 | print_verifier_state(env, state) |
5158 | 返回:负EINVAL |
名称 | 描述 |
---|---|
check_alu_op | heck validity of 32-bit and 64-bit arithmetic operations |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |