Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bpf_obj_get_info_by_fd

Proto:static int bpf_obj_get_info_by_fd(const union bpf_attr *attr, union bpf_attr __user *uattr)

Type:int

Parameter:

TypeParameterName
const union bpf_attr *attr
union bpf_attr __user *uattr
2811  ufd = anonymous struct used by BPF_OBJ_GET_INFO_BY_FD
2815  If helper macro to check that unused fields 'union bpf_attr' are zero (BPF_OBJ_GET_INFO_BY_FD) Then Return -EINVAL
2818  f = fdget(ufd)
2819  If Not file Then Return -EBADFD
2822  If f_op == bpf_prog_fops Then err = bpf_prog_get_info_by_fd( needed for tty driver, and maybe others , attr, uattr)
2825  Else if f_op == bpf_map_fops Then err = bpf_map_get_info_by_fd( needed for tty driver, and maybe others , attr, uattr)
2828  Else if f_op == btf_fops Then err = bpf_btf_get_info_by_fd( needed for tty driver, and maybe others , attr, uattr)
2830  Else err = -EINVAL
2833  fdput(f)
2834  Return err