Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_bpf.c Create Date:2022-07-28 06:26:56
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:bpf_fill_maxinsns9

Proto:static int bpf_fill_maxinsns9(struct bpf_test *self)

Type:int

Parameter:

TypeParameterName
struct bpf_test *self
268  len = BPF_MAXINSNS
272  insn = kmalloc_array - allocate memory for an array.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
273  If Not insn Then Return -ENOMEM
276  insn[0] = Conditional jumps against immediates, if (dst_reg 'op' imm32) goto pc + off16 (BPF_JA, 0, 0, len - 2)
277  insn[1] = BPF_ALU32_IMM(mov reg to reg , Redefine REGs to make tests less verbose , 0xcbababab)
278  insn[2] = Program exit ()
280  When i < len - 2 cycle insn[i] = BPF_ALU32_IMM(mov reg to reg , Redefine REGs to make tests less verbose , 0xfefefefe)
283  insn[len - 2] = Program exit ()
284  insn[len - 1] = Conditional jumps against immediates, if (dst_reg 'op' imm32) goto pc + off16 (BPF_JA, 0, 0, - (len - 1))
286  insns = insn
287  len = len
289  Return 0