函数逻辑报告 | 
Source Code:kernel\bpf\syscall.c | 
Create Date:2022-07-27 14:07:59 | 
| Last Modify:2022-05-19 18:06:12 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:bpf_task_fd_query
函数原型:static int bpf_task_fd_query(const union bpf_attr *attr, union bpf_attr __user *uattr)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| const union bpf_attr * | attr | |
| union bpf_attr __user * | uattr | 
| 2915 | pid等于 input: pid | 
| 2923 | 如果helper macro to check that unused fields 'union bpf_attr' are zero (BPF_TASK_FD_QUERY)则返回:负EINVAL | 
| 2929 | 如果 input: flags 不等于0则返回:负EINVAL | 
| 2932 | task等于get_pid_task(find_vpid(pid), 单一进程) | 
| 2936 | files等于get_files_struct(task) | 
| 2937 | put_task_struct(task) | 
| 2941 | err等于0 | 
| 2942 | 加自旋锁 | 
| 2943 | file等于fcheck_files(files, fd) | 
| 2948 | 自旋锁解锁 | 
| 2949 | put_files_struct(files) | 
| 2954 | 如果f_op恒等于bpf_raw_tp_fops则 | 
| 2958 | err等于bpf_task_fd_query_copy(attr, uattr, id, BPF_FD_TYPE_RAW_TRACEPOINT, Tracepoint name , 0, 0) | 
| 2962 | 转到:put_file | 
| 2965 | event等于perf_get_event(file) | 
| 2966 | 如果非是错误则 | 
| 2971 | err等于bpf_get_perf_event_info(event, & prog_id, & fd_type, & buf, & probe_offset, & probe_addr) | 
| 2974 | 如果非err则err等于bpf_task_fd_query_copy(attr, uattr, prog_id, fd_type, buf, probe_offset, probe_addr) | 
| 2979 | 转到:put_file | 
| 2982 | err等于负Operation is not supported | 
| 2983 | put_file : | 
| 2985 | out : | 
| 2986 | 返回:err | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |