Function report |
Source Code:kernel\bpf\verifier.c |
Create Date:2022-07-28 13:01:24 |
Last Modify:2022-05-19 20:02:10 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Adjusts the register min/max values in the case that the dst_reg is the* variable register that we are working on, and src_reg is a constant or we're* simply doing a BPF_K check.* In JEQ/JNE cases we also adjust the var_off values.
Proto:static void reg_set_min_max(struct bpf_reg_state *true_reg, struct bpf_reg_state *false_reg, u64 val, u8 opcode, bool is_jmp32)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
struct bpf_reg_state * | true_reg | |
struct bpf_reg_state * | false_reg | |
u64 | val | |
u8 | opcode | |
bool | is_jmp32 |
5581 | If __is_pointer_value(TSC's on different sockets may be reset asynchronously.* This may cause the TSC ADJUST value on socket 0 to be NOT 0., false_reg) Then Return |
5615 | Break |
5619 | false_umax = If opcode == BPF_JGT Then val Else val - 1 |
5622 | If is_jmp32 Then |
5626 | maximum possible (u64)value = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value( maximum possible (u64)value , false_umax) |
5627 | minimum possible (u64)value = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value( minimum possible (u64)value , true_umin) |
5628 | Break |
5630 | Case opcode == SGE is signed '>=', GE in x86 |
5631 | Case opcode == SGT is signed '>', GT in x86 |
5633 | false_smax = If opcode == SGT is signed '>', GT in x86 Then sval Else sval - 1 |
5634 | true_smin = If opcode == SGT is signed '>', GT in x86 Then sval + 1 Else sval |
5639 | If is_jmp32 && Not Return true if VAL is compared with a s64 sign extended from s32, and they* are with the same signedness. Then Break |
5641 | maximum possible (s64)value = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value( maximum possible (s64)value , false_smax) |
5642 | minimum possible (s64)value = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value( minimum possible (s64)value , true_smin) |
5643 | Break |
5645 | Case opcode == LE is unsigned, '<=' |
5646 | Case opcode == LT is unsigned, '<' |
5648 | false_umin = If opcode == LT is unsigned, '<' Then val Else val + 1 |
5649 | true_umax = If opcode == LT is unsigned, '<' Then val - 1 Else val |
5651 | If is_jmp32 Then |
5655 | minimum possible (u64)value = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value( minimum possible (u64)value , false_umin) |
5656 | maximum possible (u64)value = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value( maximum possible (u64)value , true_umax) |
5657 | Break |
5659 | Case opcode == SLE is signed, '<=' |
5660 | Case opcode == SLT is signed, '<' |
5662 | false_smin = If opcode == SLT is signed, '<' Then sval Else sval + 1 |
5663 | true_smax = If opcode == SLT is signed, '<' Then sval - 1 Else sval |
5665 | If is_jmp32 && Not Return true if VAL is compared with a s64 sign extended from s32, and they* are with the same signedness. Then Break |
5667 | minimum possible (s64)value = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value( minimum possible (s64)value , false_smin) |
5668 | maximum possible (s64)value = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value( maximum possible (s64)value , true_smax) |
5669 | Break |
5671 | Default |
5672 | Break |
5680 | If is_jmp32 Then |
5682 | __reg_bound_offset32(true_reg) |
Name | Describe |
---|---|
check_cond_jmp_op |
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 |