Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:btf_get_info_by_fd

Proto:int btf_get_info_by_fd(const struct btf *btf, const union bpf_attr *attr, union bpf_attr __user *uattr)

Type:int

Parameter:

TypeParameterName
const struct btf *btf
const union bpf_attr *attr
union bpf_attr __user *uattr
4220  __user * uinfo
4221  struct bpf_btf_info info = {}
4223  __user * ubtf
4226  uinfo = u64_to_user_ptr(info)
4227  uinfo_len = info_len
4229  info_copy = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u32, uinfo_len, size of info )
4230  If copy_from_user( & info, uinfo, info_copy) Then Return -EFAULT
4233  id = id
4234  ubtf = u64_to_user_ptr(btf)
4235  btf_copy = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u32, data_size, btf_size)
4236  If copy_to_user(ubtf, data, btf_copy) Then Return -EFAULT
4238  btf_size = data_size
4240  If copy_to_user(uinfo, & info, info_copy) || Write a simple value into user space(info_copy, & info_len) Then Return -EFAULT
4244  Return 0