Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sockopt_alloc_buf

Proto:static int sockopt_alloc_buf(struct bpf_sockopt_kern *ctx, int max_optlen)

Type:int

Parameter:

TypeParameterName
struct bpf_sockopt_kern *ctx
intmax_optlen
966  If Value for the false possibility is greater at compile time(max_optlen > PAGE_SIZE) || max_optlen < 0 Then Return -EINVAL
969  optval = 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).
970  If Not optval Then Return -ENOMEM
973  optval_end = optval + max_optlen
975  Return 0
Caller
NameDescribe
__cgroup_bpf_run_filter_setsockopt
__cgroup_bpf_run_filter_getsockopt