函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\btf.c Create Date:2022-07-27 14:39:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:btf_get_info_by_fd

函数原型:int btf_get_info_by_fd(const struct btf *btf, const union bpf_attr *attr, union bpf_attr __user *uattr)

返回类型:int

参数:

类型参数名称
const struct btf *btf
const union bpf_attr *attr
union bpf_attr __user *uattr
4220  __useruinfo
4221  struct bpf_btf_info info = {}
4223  __userubtf
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, info的长度)
4230  如果copy_from_user( & info, uinfo, info_copy)则返回:负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  如果copy_to_user(ubtf, data, btf_copy)则返回:负EFAULT
4238  btf_size等于data_size
4240  如果copy_to_user(uinfo, & info, info_copy)或put_user - Write a simple value into user space(info_copy, & info_len)则返回:负EFAULT
4244  返回:0
调用者
名称描述
bpf_btf_get_info_by_fd