Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\core.c Create Date:2022-07-28 12:47:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:bpf_prog_alloc_no_stats

Proto:struct bpf_prog *bpf_prog_alloc_no_stats(unsigned int size, gfp_t gfp_extra_flags)

Type:struct bpf_prog

Parameter:

TypeParameterName
unsigned intsize
gfp_tgfp_extra_flags
80  gfp_flags = GFP_KERNEL | __GFP_ZERO | gfp_extra_flags
84  size = und_up - round up to next specified power of 2*@x: the value to round*@y: multiple to round up to (must be a power of 2)* Rounds @x up to next multiple of @y (which must be a power of 2).* To perform arbitrary rounding up, use roundup() below.(size, PAGE_SIZE)
85  fp = __vmalloc(size, gfp_flags, PAGE_KERNEL)
86  If (fp == NULL) Then Return NULL
89  aux = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
90  If (aux == NULL) Then
91  vfree(fp)
92  Return NULL
95  Number of allocated pages = size / PAGE_SIZE
96  Auxiliary fields = aux
97  prog = fp
98  archs need to JIT the prog = ebpf_jit_enabled()
100  INIT_LIST_HEAD_RCU - Initialize a list_head visible to RCU readers*@list: list to be initialized* You should instead use INIT_LIST_HEAD() for normal initialization and* cleanup tasks, when readers have no access to the list being initialized
102  Return fp
Caller
NameDescribe
bpf_prog_alloc
jit_subprogs