| 函数逻辑报告 | 
| Source Code: kernel\events\core.c | Create Date:2022-07-27 15:01:00 | 
| Last Modify:2022-05-20 07:50:19 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:perf_copy_attr
函数原型:static int perf_copy_attr(struct perf_event_attr __user *uattr, struct perf_event_attr *attr)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct perf_event_attr __user * | uattr | |
| struct perf_event_attr * | attr | 
| 10908 | ret等于Careful: we have to cast the result to the type of the pointer* for sign reasons(size, & Size of the attr structure, for fwd/bwd compat.) | 
| 10913 | 如果非size则size等于sizeof first published struct | 
| 10915 | 如果size小于sizeof first published struct 或size大于PAGE_SIZE则转到:err_size | 
| 10918 | ret等于py_struct_from_user: copy a struct from userspace*@dst: Destination address, in kernel space | 
| 10919 | 如果ret则 | 
| 10927 | 如果__reserved_1或__reserved_2或__reserved_3则返回:负EINVAL | 
| 10930 | 如果sample_type按位与PERF_SAMPLE_MAX减1的差的反则返回:负EINVAL | 
| 10933 | 如果read_format按位与PERF_FORMAT_MAX减1的差的反则返回:负EINVAL | 
| 10936 | 如果sample_type按位与PERF_SAMPLE_BRANCH_STACK则 | 
| 10937 | mask等于um perf_branch_sample_type | 
| 10940 | 如果mask按位与PERF_SAMPLE_BRANCH_MAX减1的差的反则返回:负EINVAL | 
| 10944 | 如果非mask按位与PERF_SAMPLE_BRANCH_PLM_ALL的反的值则返回:负EINVAL | 
| 10948 | 如果非mask按位与PERF_SAMPLE_BRANCH_PLM_ALL的值则 | 
| 10951 | 如果非ditto kernel 则mask或等于PERF_SAMPLE_BRANCH_KERNEL | 
| 10954 | 如果非don't count user 则mask或等于PERF_SAMPLE_BRANCH_USER | 
| 10957 | 如果非ditto hypervisor 则mask或等于PERF_SAMPLE_BRANCH_HV | 
| 10962 | um perf_branch_sample_type 等于mask | 
| 10965 | 如果mask按位与anch priv levels that need permission checks则 | 
| 10966 | ret等于perf_allow_kernel(attr) | 
| 10972 | 如果sample_type按位与PERF_SAMPLE_REGS_USER则 | 
| 10978 | 如果sample_type按位与PERF_SAMPLE_STACK_USER则 | 
| 10979 | 如果非arch_perf_have_user_stack_dump()则返回:负ENOSYS | 
| 10987 | 如果Defines size of the user stack to dump on samples.大于等于USHRT_MAX则返回:负EINVAL | 
| 10989 | 否则如果非IS_ALIGNED(Defines size of the user stack to dump on samples., sizeof(u64))则返回:负EINVAL | 
| 10998 | out : | 
| 10999 | 返回:ret | 
| 11001 | err_size : | 
| 11002 | put_user - Write a simple value into user space(attr的长度, & Size of the attr structure, for fwd/bwd compat.) | 
| 11004 | 转到:out | 
| 名称 | 描述 | 
|---|---|
| _perf_ioctl | 
| 源代码转换工具 开放的插件接口 | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |