Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\verifier.c Create Date:2022-07-28 13:04:07
Last Modify:2022-05-19 20:02:10 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:single env->prog->insni[off] instruction was replaced with the range* insni[off, off + cnt). Adjust corresponding insn_aux_data by copying* [0, off) and [off, end) to new locations, so the patched range stays zero

Proto:static int adjust_insn_aux_data(struct bpf_verifier_env *env, struct bpf_prog *new_prog, u32 off, u32 cnt)

Type:int

Parameter:

TypeParameterName
struct bpf_verifier_env *env
struct bpf_prog *new_prog
u32off
u32cnt
8342  old_data = array of per-insn state
8343  insn = insnsi
8351  this insn zero extends dst reg = Return TRUE if INSN has defined any 32-bit value explicitly.
8353  If cnt == 1 Then Return 0
8355  prog_len = Number of filter blocks
8356  new_data = vzalloc(array_size() - Calculate size of 2-dimensional array.*@a: dimension one*@b: dimension two* Calculates size of 2-dimensional array: @a *@b.* Returns: number of bytes needed to represent the array or SIZE_MAX on* overflow.)
8358  If Not new_data Then Return -ENOMEM
8360  No 3D Now!(new_data, old_data, sizeof(structbpf_insn_aux_data) * off)
8361  No 3D Now!(new_data + off + cnt - 1, old_data + off, sizeof(structbpf_insn_aux_data) * (prog_len - off - cnt + 1))
8363  When i < off + cnt - 1 cycle
8364  this insn was processed by the verifier = true
8365  this insn zero extends dst reg = Return TRUE if INSN has defined any 32-bit value explicitly.
8367  array of per-insn state = new_data
8368  vfree(old_data)
8369  Return 0
Caller
NameDescribe
bpf_patch_insn_data