函数逻辑报告 |
Source Code:kernel\bpf\verifier.c |
Create Date:2022-07-27 14:14:51 |
| Last Modify:2022-05-19 20:02:10 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:WARNING: This function does calculations on 64-bit values, but the actual* execution may occur on 32-bit values. Therefore, things like bitshifts* need extra checks in the 32-bit case.
函数原型:static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct bpf_verifier_env * | env | |
| struct bpf_insn * | insn | |
| struct bpf_reg_state * | dst_reg | |
| struct bpf_reg_state | src_reg |
| 4809 | opcode等于alu/jmp fields ( opcode ) |
| 4813 | insn_bitness等于如果Instruction classes ( opcode )恒等于alu mode in double word width 则64否则32 |
| 4814 | dst等于 dest register |
| 4817 | 如果insn_bitness恒等于32则 |
| 4845 | 返回:0 |
| 4850 | ret等于sanitize_val_alu(env, insn) |
| 4851 | 如果ret小于0则 |
| 4859 | 否则 |
| 4860 | minimum possible (s64)value 加等于smin_val |
| 4861 | maximum possible (s64)value 加等于smax_val |
| 4865 | minimum possible (u64)value 等于0 |
| 4867 | 否则 |
| 4868 | minimum possible (u64)value 加等于umin_val |
| 4869 | maximum possible (u64)value 加等于umax_val |
| 4872 | 退出 |
| 4874 | ret等于sanitize_val_alu(env, insn) |
| 4875 | 如果ret小于0则 |
| 4884 | 否则 |
| 4885 | minimum possible (s64)value 减等于smax_val |
| 4886 | maximum possible (s64)value 减等于smin_val |
| 4888 | 如果 minimum possible (u64)value 小于umax_val则 |
| 4890 | minimum possible (u64)value 等于0 |
| 4892 | 否则 |
| 4894 | minimum possible (u64)value 减等于umax_val |
| 4895 | maximum possible (u64)value 减等于umin_val |
| 4898 | 退出 |
| 4901 | 如果smin_val小于0或 minimum possible (s64)value 小于0则 |
| 4905 | 退出 |
| 4910 | 如果umax_val大于U32_MAX或 maximum possible (u64)value 大于U32_MAX则 |
| 4915 | 退出 |
| 4917 | minimum possible (u64)value 乘等于umin_val |
| 4918 | maximum possible (u64)value 乘等于umax_val |
| 4919 | 如果 maximum possible (u64)value 大于S64_MAX则 |
| 4923 | 否则 |
| 4927 | 退出 |
| 4932 | 退出 |
| 4938 | minimum possible (u64)value 等于value |
| 4940 | 如果 minimum possible (s64)value 小于0或smin_val小于0则 |
| 4946 | 否则 |
| 4955 | 退出 |
| 4960 | 退出 |
| 4967 | maximum possible (u64)value 等于value按位或mask |
| 4969 | 如果 minimum possible (s64)value 小于0或smin_val小于0则 |
| 4975 | 否则 |
| 4984 | 退出 |
| 4986 | 如果umax_val大于等于insn_bitness则 |
| 4990 | mark_reg_unknown(env, regs, dest register ) |
| 4991 | 退出 |
| 4999 | 如果 maximum possible (u64)value 大于1ULL左移63减umax_val位则 |
| 5000 | minimum possible (u64)value 等于0 |
| 5002 | 否则 |
| 5003 | minimum possible (u64)value 左移等于umin_val位 |
| 5004 | maximum possible (u64)value 左移等于umax_val位 |
| 5009 | 退出 |
| 5011 | 如果umax_val大于等于insn_bitness则 |
| 5015 | mark_reg_unknown(env, regs, dest register ) |
| 5016 | 退出 |
| 5035 | minimum possible (u64)value 右移等于umax_val位 |
| 5036 | maximum possible (u64)value 右移等于umin_val位 |
| 5039 | 退出 |
| 5041 | 如果umax_val大于等于insn_bitness则 |
| 5045 | mark_reg_unknown(env, regs, dest register ) |
| 5046 | 退出 |
| 5052 | 如果insn_bitness恒等于32则 |
| 5055 | 否则 |
| 5056 | minimum possible (s64)value 右移等于umin_val位 |
| 5057 | maximum possible (s64)value 右移等于umin_val位 |
| 5066 | minimum possible (u64)value 等于0 |
| 5069 | 退出 |
| 5070 | 默认 |
| 5071 | mark_reg_unknown(env, regs, dest register ) |
| 5072 | 退出 |
| 5075 | 如果Instruction classes ( opcode )不等于alu mode in double word width 则 |
| 5082 | 返回:0 |
| 名称 | 描述 |
|---|---|
| adjust_reg_min_max_vals | Handles ALU ops other than BPF_END, BPF_NEG and BPF_MOV: computes new min/max* and var_off. |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |