函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:bpf_obj_get_info_by_fd

函数原型:static int bpf_obj_get_info_by_fd(const union bpf_attr *attr, union bpf_attr __user *uattr)

返回类型:int

参数:

类型参数名称
const union bpf_attr *attr
union bpf_attr __user *uattr
2811  ufd等于 anonymous struct used by BPF_OBJ_GET_INFO_BY_FD
2815  如果helper macro to check that unused fields 'union bpf_attr' are zero (BPF_OBJ_GET_INFO_BY_FD)则返回:负EINVAL
2818  f等于fdget(ufd)
2819  如果非file则返回:负EBADFD
2822  如果f_op恒等于bpf_prog_fopserr等于bpf_prog_get_info_by_fd( needed for tty driver, and maybe others , attr, uattr)
2825  否则如果f_op恒等于bpf_map_fopserr等于bpf_map_get_info_by_fd( needed for tty driver, and maybe others , attr, uattr)
2828  否则如果f_op恒等于btf_fopserr等于bpf_btf_get_info_by_fd( needed for tty driver, and maybe others , attr, uattr)
2830  否则err等于负EINVAL
2833  fdput(f)
2834  返回:err