函数逻辑报告 |
Source Code:kernel\bpf\verifier.c |
Create Date:2022-07-27 14:15:11 |
Last Modify:2022-05-19 20:02:10 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:heck validity of 32-bit and 64-bit arithmetic operations
函数原型:static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct bpf_verifier_env * | env | |
struct bpf_insn * | insn |
5167 | opcode等于alu/jmp fields ( opcode ) |
5170 | 如果opcode恒等于lags for endianness conversion: 或opcode恒等于BPF_NEG则 |
5172 | 如果BPF_SRC( opcode )不等于0或 source register 不等于BPF_REG_0或 signed offset 不等于0或 signed immediate constant 不等于0则 |
5178 | 否则 |
5179 | 如果 source register 不等于BPF_REG_0或 signed offset 不等于0或 signed immediate constant 不等于16且 signed immediate constant 不等于32且 signed immediate constant 不等于64或Instruction classes ( opcode )恒等于alu mode in double word width 则 |
5192 | 如果is_pointer_value(env, dest register )则 |
5193 | verbose(env, "R%d pointer arithmetic prohibited\n", dest register ) |
5195 | 返回:负EACCES |
5203 | 否则如果opcode恒等于mov reg to reg 则 |
5206 | 如果 signed immediate constant 不等于0或 signed offset 不等于0则 |
5215 | 否则 |
5216 | 如果 source register 不等于BPF_REG_0或 signed offset 不等于0则 |
5223 | err等于check_reg_arg(env, dest register , DST_OP_NO_MARK) |
5228 | src_reg等于regs加 source register |
5229 | dst_reg等于regs加 dest register |
5231 | 如果Instruction classes ( opcode )恒等于alu mode in double word width 则 |
5238 | 否则 |
5240 | 如果is_pointer_value(env, source register )则 |
5241 | verbose(env, "R%d partial copy of pointer\n", source register ) |
5244 | 返回:负EACCES |
5249 | 否则 |
5250 | mark_reg_unknown(env, regs, dest register ) |
5255 | 否则 |
5260 | mark_reg_unknown(env, regs, dest register ) |
5262 | 如果Instruction classes ( opcode )恒等于alu mode in double word width 则 |
5265 | 否则 |
5271 | 否则如果opcode大于lags for endianness conversion: 则 |
5275 | 否则 |
5278 | 如果 signed immediate constant 不等于0或 signed offset 不等于0则 |
5286 | 否则 |
5287 | 如果 source register 不等于BPF_REG_0或 signed offset 不等于0则 |
5306 | size等于如果Instruction classes ( opcode )恒等于alu mode in double word width 则64否则32 |
5308 | 如果 signed immediate constant 小于0或 signed immediate constant 大于等于size则 |
5309 | verbose(env, "invalid shift %d\n", signed immediate constant ) |
5310 | 返回:负EINVAL |
5315 | err等于check_reg_arg(env, dest register , DST_OP_NO_MARK) |
5322 | 返回:0 |
名称 | 描述 |
---|---|
do_check |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |