Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bpf_task_fd_query_copy

Proto:static int bpf_task_fd_query_copy(const union bpf_attr *attr, union bpf_attr __user *uattr, u32 prog_id, u32 fd_type, const char *buf, u64 probe_offset, u64 probe_addr)

Type:int

Parameter:

TypeParameterName
const union bpf_attr *attr
union bpf_attr __user *uattr
u32prog_id
u32fd_type
const char *buf
u64probe_offset
u64probe_addr
2869  __user * ubuf = u64_to_user_ptr(buf)
2870  len = If buf Then strlen - Find the length of a string*@s: The string to be sized Else 0
2871  err = 0
2873  If Write a simple value into user space(len, & input/output: buf len ) Then Return -EFAULT
2875  input_len = input/output: buf len
2876  If input_len && ubuf Then
2877  If Not len Then
2879  zero = '\0'
2883  Else if input_len >= len + 1 Then
2885  If copy_to_user(ubuf, buf, len + 1) Then Return -EFAULT
2887  Else
2891  zero = '\0'
2893  err = -ENOSPC
2894  If copy_to_user(ubuf, buf, input_len - 1) Then Return -EFAULT
2901  If Write a simple value into user space(prog_id, & output: prod_id ) || Write a simple value into user space(fd_type, & output: BPF_FD_TYPE_* ) || Write a simple value into user space(probe_offset, & output: probe_offset ) || Write a simple value into user space(probe_addr, & output: probe_addr ) Then Return -EFAULT
2907  Return err
Caller
NameDescribe
bpf_task_fd_query