Function report |
Source Code:kernel\bpf\verifier.c |
Create Date:2022-07-28 12:57:03 |
| Last Modify:2022-05-19 20:02:10 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:check_reg_arg
Proto:static int check_reg_arg(struct bpf_verifier_env *env, u32 regno, enum reg_arg_type t)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct bpf_verifier_env * | env | |
| u32 | regno | |
| enum reg_arg_type | t |
| 1428 | vstate = current verifier state |
| 1429 | state = call stack tracking [curframe] |
| 1434 | If regno >= BPF has 10 general purpose 64-bit registers and stack frame. Then |
| 1440 | rw64 = This function is supposed to be used by the following 32-bit optimization* code only. It returns TRUE if the source or destination register operates* on 64-bit, otherwise return FALSE. |
| 1441 | If t == register is used as source operand Then |
| 1448 | If regno == BPF_REG_FP Then Return 0 |
| 1451 | If rw64 Then mark_insn_zext(env, reg) |
| 1456 | Else |
| 1458 | If regno == BPF_REG_FP Then |
| 1464 | If t == register is used as destination operand Then mark_reg_unknown(env, regs, regno) |
| 1467 | Return 0 |
| Name | Describe |
|---|---|
| check_xadd | |
| check_func_arg | |
| check_func_call | |
| check_helper_call | |
| check_alu_op | heck validity of 32-bit and 64-bit arithmetic operations |
| check_cond_jmp_op | |
| check_ld_imm | verify BPF_LD_IMM64 instruction |
| check_ld_abs | verify safety of LD_ABS|LD_IND instructions:* - they can only appear in the programs where ctx == skb* - since they are wrappers of function calls, they scratch R1-R5 registers,* preserve R6-R9, and store return value into R0* Implicit input:* ctx == skb |
| do_check |
| 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 |