Function report |
Source Code:kernel\bpf\verifier.c |
Create Date:2022-07-28 13:01:14 |
| Last Modify:2022-05-19 20:02:10 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:mpute branch direction of the expression "if (reg opcode val) goto target;"* and return:* 1 - branch will be taken and "goto target" will be executed* 0 - branch will not be taken and fall-through to next insn* -1 - unknown
Proto:static int is_branch_taken(struct bpf_reg_state *reg, u64 val, u8 opcode, bool is_jmp32)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct bpf_reg_state * | reg | |
| u64 | val | |
| u8 | opcode | |
| bool | is_jmp32 |
| 5435 | 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., reg) Then Return -1 |
| 5438 | If is_jmp32 Then |
| 5459 | If ( maximum possible (u64)value ^ minimum possible (u64)value ) & 1ULL << 31 Then |
| 5469 | Else |
| 5475 | If Returns true if @a is a known constant Then Return Not Not Returns true if @a == tnum_const(@b) |
| 5477 | Break |
| 5479 | If Returns true if @a is a known constant Then Return Not Returns true if @a == tnum_const(@b) |
| 5481 | Break |
| 5487 | Break |
| 5489 | If minimum possible (u64)value > val Then Return 1 |
| 5491 | Else if maximum possible (u64)value <= val Then Return 0 |
| 5493 | Break |
| 5494 | Case opcode == SGT is signed '>', GT in x86 |
| 5495 | If minimum possible (s64)value > sval Then Return 1 |
| 5497 | Else if maximum possible (s64)value < sval Then Return 0 |
| 5499 | Break |
| 5500 | Case opcode == LT is unsigned, '<' |
| 5501 | If maximum possible (u64)value < val Then Return 1 |
| 5503 | Else if minimum possible (u64)value >= val Then Return 0 |
| 5505 | Break |
| 5506 | Case opcode == SLT is signed, '<' |
| 5507 | If maximum possible (s64)value < sval Then Return 1 |
| 5509 | Else if minimum possible (s64)value >= sval Then Return 0 |
| 5511 | Break |
| 5513 | If minimum possible (u64)value >= val Then Return 1 |
| 5515 | Else if maximum possible (u64)value < val Then Return 0 |
| 5517 | Break |
| 5518 | Case opcode == SGE is signed '>=', GE in x86 |
| 5519 | If minimum possible (s64)value >= sval Then Return 1 |
| 5521 | Else if maximum possible (s64)value < sval Then Return 0 |
| 5523 | Break |
| 5524 | Case opcode == LE is unsigned, '<=' |
| 5525 | If maximum possible (u64)value <= val Then Return 1 |
| 5527 | Else if minimum possible (u64)value > val Then Return 0 |
| 5529 | Break |
| 5530 | Case opcode == SLE is signed, '<=' |
| 5531 | If maximum possible (s64)value <= sval Then Return 1 |
| 5533 | Else if minimum possible (s64)value > sval Then Return 0 |
| 5535 | Break |
| 5538 | Return -1 |
| 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 |