Function report |
Source Code:kernel\bpf\verifier.c |
Create Date:2022-07-28 13:00:54 |
Last Modify:2022-05-19 20:02:10 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Handles ALU ops other than BPF_END, BPF_NEG and BPF_MOV: computes new min/max* and var_off.
Proto:static int adjust_reg_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
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 | If Ordering of fields matters. See states_equal() != g doesn't contain a valid pointer Then ptr_reg = dst_reg |
5103 | src_reg = regs[ source register ] |
5110 | If opcode == BPF_SUB && allow_ptr_leaks Then |
5111 | mark_reg_unknown(env, regs, dest register ) |
5112 | Return 0 |
5114 | verbose(env, "R%d pointer %s pointer prohibited\n", dest register , bpf_alu_string[opcode >> 4]) |
5117 | Return -EACCES |
5118 | Else |
5123 | err = mark_chain_precision(env, dest register ) |
5129 | Else if ptr_reg Then |
5131 | err = mark_chain_precision(env, source register ) |
5137 | Else |
5150 | If WARN_ON_ONCE(ptr_reg) Then |
5151 | print_verifier_state(env, state) |
5153 | Return -EINVAL |
5156 | print_verifier_state(env, state) |
5158 | Return -EINVAL |
Name | Describe |
---|---|
check_alu_op | heck validity of 32-bit and 64-bit arithmetic operations |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |