Function report |
Source Code:kernel\bpf\verifier.c |
Create Date:2022-07-28 13:04:33 |
Last Modify:2022-05-19 20:02:10 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:opt_subreg_zext_lo32_rnd_hi32
Proto:static int opt_subreg_zext_lo32_rnd_hi32(struct bpf_verifier_env *env, const union bpf_attr *attr)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct bpf_verifier_env * | env | |
const union bpf_attr * | attr |
8666 | struct bpf_insn * patch, zext_patch[2], rnd_hi32_patch[4] |
8667 | aux = array of per-insn state |
8668 | delta = 0 , len = Number of filter blocks |
8675 | rnd_hi32_patch[1] = ALU ops on immediates, bpf_add|sub|...: dst_reg += imm32 (mov reg to reg , Kernel hidden auxiliary/helper register. , 0) |
8676 | rnd_hi32_patch[2] = ALU ops on immediates, bpf_add|sub|...: dst_reg += imm32 (BPF_LSH, Kernel hidden auxiliary/helper register. , 32) |
8677 | rnd_hi32_patch[3] = ALU ops on registers, bpf_add|sub|...: dst_reg += src_reg (BPF_OR, 0, Kernel hidden auxiliary/helper register. ) |
8683 | If Not this insn zero extends dst reg Then |
8687 | If Not rnd_hi32 Then Continue |
8691 | class = Instruction classes (code) |
8692 | If Return TRUE if INSN doesn't have explicit value define. Then Continue |
8707 | If class == BPF_LDX && pointer type for load/store insns == g points to bpf_context Then Continue |
8711 | imm_rnd = get_random_int() |
8712 | rnd_hi32_patch[0] = insn |
8713 | signed immediate constant = imm_rnd |
8714 | dest register = dest register |
8715 | patch = rnd_hi32_patch |
8716 | patch_len = 4 |
8717 | Go to apply_patch_buffer |
8720 | If Not Return TRUE if the JIT backend wants verifier to enable sub-register usage* analysis code and wants explicit zero extension inserted by verifier.* Otherwise, return FALSE. Then Continue |
8723 | zext_patch[0] = insn |
8724 | dest register = dest register |
8725 | source register = dest register |
8726 | patch = zext_patch |
8727 | patch_len = 2 |
8728 | apply_patch_buffer : |
8734 | aux = array of per-insn state |
8738 | Return 0 |
Name | Describe |
---|---|
bpf_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 |