函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\core.c Create Date:2022-07-27 10:37:16
Last Modify:2022-05-22 13:40:38 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Copy the kernel size attribute structure (which might be larger* than what user-space knows about) to user-space.* Note that all cases are valid: user-space buffer can be larger or* smaller than the kernel-space buffer. The usual case is that both

函数原型:static int sched_attr_copy_to_user(struct sched_attr __user *uattr, struct sched_attr *kattr, unsigned int usize)

返回类型:int

参数:

类型参数名称
struct sched_attr __user *uattr
struct sched_attr *kattr
unsigned intusize
5322  ksize等于kattr的长度
5324  如果非access_ok - Checks if a user space pointer is valid*@addr: User space pointer to start of block to check*@size: Size of block to check* Context: User context only. This function may sleep if pagefaults are* enabled.(uattr, usize)则返回:负EFAULT
5340  size等于两数取小(usize, ksize)
5342  如果copy_to_user(uattr, kattr, size)则返回:负EFAULT
5345  返回:0
调用者
名称描述
SYSCALL_DEFINE4sys_sched_getattr - similar to sched_getparam, but with sched_attr*@pid: the pid in question.*@uattr: structure containing the extended parameters.*@usize: sizeof(attr) for fwd/bwd comp.*@flags: for future extension.