Function report |
Source Code:kernel\bpf\syscall.c |
Create Date:2022-07-28 12:54:57 |
| Last Modify:2022-05-19 18:06:12 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:bpf_task_fd_query
Proto:static int bpf_task_fd_query(const union bpf_attr *attr, union bpf_attr __user *uattr)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| const union bpf_attr * | attr | |
| union bpf_attr __user * | uattr |
| 2915 | pid = input: pid |
| 2923 | If helper macro to check that unused fields 'union bpf_attr' are zero (BPF_TASK_FD_QUERY) Then Return -EINVAL |
| 2926 | If Not Check operation authority Then Return -EPERM |
| 2929 | If input: flags != 0 Then Return -EINVAL |
| 2932 | task = get_pid_task(find_vpid(pid), PIDTYPE_PID) |
| 2936 | files = get_files_struct(task) |
| 2937 | put_task_struct(task) |
| 2941 | err = 0 |
| 2943 | file = fcheck_files(files, fd) |
| 2949 | put_files_struct(files) |
| 2954 | If f_op == bpf_raw_tp_fops Then |
| 2958 | err = bpf_task_fd_query_copy(attr, uattr, id, BPF_FD_TYPE_RAW_TRACEPOINT, Tracepoint name , 0, 0) |
| 2962 | Go to put_file |
| 2965 | event = perf_get_event(file) |
| 2971 | err = bpf_get_perf_event_info(event, & prog_id, & fd_type, & buf, & probe_offset, & probe_addr) |
| 2974 | If Not err Then err = bpf_task_fd_query_copy(attr, uattr, prog_id, fd_type, buf, probe_offset, probe_addr) |
| 2979 | Go to put_file |
| 2982 | err = -Operation is not supported |
| 2983 | put_file : |
| 2985 | out : |
| 2986 | Return err |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |