Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\core.c Create Date:2022-07-28 09:36:40
Last Modify:2022-05-22 13:40:38 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:static int sched_attr_copy_to_user(struct sched_attr __user *uattr, struct sched_attr *kattr, unsigned int usize)

Type:int

Parameter:

TypeParameterName
struct sched_attr __user *uattr
struct sched_attr *kattr
unsigned intusize
5322  ksize = size of kattr
5324  If Not 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) Then Return -EFAULT
5340  size = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(usize, ksize)
5342  If copy_to_user(uattr, kattr, size) Then Return -EFAULT
5345  Return 0
Caller
NameDescribe
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.