Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bpf_adj_linfo_after_remove

Proto:static int bpf_adj_linfo_after_remove(struct bpf_verifier_env *env, u32 off, u32 cnt)

Type:int

Parameter:

TypeParameterName
struct bpf_verifier_env *env
u32off
u32cnt
8464  prog = BPF program being verified
8468  nr_linfo = nr_linfo
8469  If Not nr_linfo Then Return 0
8472  linfo = bpf_line_info loaded from userspace. linfo->insn_off * has the xlated insn offset. * Both the main and sub prog share the same linfo. * The subprog can access its first linfo by * using the linfo_idx.
8475  When i < nr_linfo cycle If insn_off >= off Then
8477  Break
8479  l_off = i
8480  l_cnt = 0
8481  When i < nr_linfo cycle If insn_off < off + cnt Then
8483  l_cnt++
8484  Else Break
8491  If Number of filter blocks != off && l_cnt && ( i == nr_linfo || insn_off != off + cnt ) Then
8493  l_cnt--
8494  insn_off = off + cnt
8498  If l_cnt Then
8499  memmove(linfo + l_off, linfo + i, size of linfo * (nr_linfo - i))
8502  nr_linfo -= l_cnt
8503  nr_linfo = nr_linfo
8507  When i < nr_linfo cycle insn_off -= cnt
8511  When i <= subprog_cnt cycle If The idx to the main_prog->aux->linfo > l_off Then
8516  If The idx to the main_prog->aux->linfo >= l_off + l_cnt Then The idx to the main_prog->aux->linfo -= l_cnt
8518  Else The idx to the main_prog->aux->linfo = l_off
8522  Return 0
Caller
NameDescribe
verifier_remove_insns