Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\syscall.c Create Date:2022-07-28 12:51:47
Last Modify:2022-05-19 18:06:12 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:bpf_map_charge_init

Proto:int bpf_map_charge_init(struct bpf_map_memory *mem, u64 size)

Type:int

Parameter:

TypeParameterName
struct bpf_map_memory *mem
u64size
222  pages = 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) >> PAGE_SHIFT determines the page size
226  If size >= U32_MAX - PAGE_SIZE Then Return -E2BIG
229  user = get_current_user - Get the current task's user_struct* Get the user record of the current task, pinning it so that it can't go* away.()
230  ret = bpf_charge_memlock(user, pages)
231  If ret Then
232  free_uid(user)
233  Return ret
236  pages = pages
237  user = user
239  Return 0
Caller
NameDescribe
htab_map_alloc
array_map_alloc
trie_alloc
cgroup_storage_map_alloc
queue_stack_map_alloc
dev_map_init_map
cpu_map_alloc
xsk_map_alloc
stack_map_allocCalled from syscall
reuseport_array_alloc