Function report |
Source Code:kernel\bpf\verifier.c |
Create Date:2022-07-28 13:02:09 |
| Last Modify:2022-05-19 20:02:10 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:static int check_ld_abs(struct bpf_verifier_env *env, struct bpf_insn *insn)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct bpf_verifier_env * | env | |
| struct bpf_insn * | insn |
| 6275 | mode = BPF BPF_DW 0x18 64-bit ( opcode ) |
| 6278 | If Not may_access_skb( Type of BPF program ) Then |
| 6280 | Return -EINVAL |
| 6283 | If Not gen_ld_abs Then |
| 6288 | If subprog_cnt > 1 Then |
| 6297 | Return -EINVAL |
| 6300 | If dest register != BPF_REG_0 || signed offset != 0 || ld/ldx fields ( opcode ) == double word (64-bit) || mode == BPF_ABS && source register != BPF_REG_0 Then |
| 6308 | err = check_reg_arg(env, ctx_reg, register is used as source operand ) |
| 6316 | err = check_reference_leak(env) |
| 6317 | If err Then |
| 6322 | If active_spin_lock Then |
| 6324 | Return -EINVAL |
| 6345 | When i < CALLER_SAVED_REGS cycle |
| 6346 | mark_reg_not_init(env, regs, caller_saved[i]) |
| 6347 | check_reg_arg(env, caller_saved[i], DST_OP_NO_MARK) |
| 6354 | mark_reg_unknown(env, regs, BPF_REG_0) |
| 6357 | Return 0 |
| Name | Describe |
|---|---|
| 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 |