函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:bpf_map_charge_init

函数原型:int bpf_map_charge_init(struct bpf_map_memory *mem, u64 size)

返回类型:int

参数:

类型参数名称
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  如果size大于等于U32_MAXPAGE_SIZE则返回:负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  如果ret
232  free_uid(user)
233  返回:ret
236  pages等于pages
237  user等于user
239  返回:0
调用者
名称描述
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