函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\verifier.c Create Date:2022-07-27 14:18:47
Last Modify:2022-05-19 20:02:10 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:static int adjust_insn_aux_data(struct bpf_verifier_env *env, struct bpf_prog *new_prog, u32 off, u32 cnt)

返回类型:int

参数:

类型参数名称
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  如果cnt恒等于1则返回: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  如果非new_data则返回:负ENOMEM
8360  内存复制(new_data, old_data, sizeof(structbpf_insn_aux_data) * off)
8361  内存复制(new_data + off + cnt - 1, old_data + off, sizeof(structbpf_insn_aux_data) * (prog_len - off - cnt + 1))
8363 i小于offcnt减1循环
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  返回:0
调用者
名称描述
bpf_patch_insn_data