Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\fork.c Create Date:2022-07-28 08:58:49
Last Modify:2020-03-17 11:04:53 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:copy_clone_args_from_user

Proto:noinline static int copy_clone_args_from_user(struct kernel_clone_args *kargs, struct clone_args __user *uargs, size_t usize)

Type:int

Parameter:

TypeParameterName
struct kernel_clone_args *kargs
struct clone_args __user *uargs
size_tusize
2597  kset_tid = set_tid
2599  If Value for the false possibility is greater at compile time(usize > PAGE_SIZE) Then Return -E2BIG
2601  If Value for the false possibility is greater at compile time(usize < sizeof first published struct ) Then Return -EINVAL
2604  err = py_struct_from_user: copy a struct from userspace*@dst: Destination address, in kernel space
2605  If err Then Return err
2608  If Value for the false possibility is greater at compile time(set_tid_size > MAX_PID_NS_LEVEL is needed for limiting size of 'struct pid' ) Then Return -EINVAL
2611  If Value for the false possibility is greater at compile time(!set_tid && set_tid_size > 0) Then Return -EINVAL
2614  If Value for the false possibility is greater at compile time(set_tid && set_tid_size == 0) Then Return -EINVAL
2621  If Value for the false possibility is greater at compile time((exit_signal & ~((u64)signal mask to be sent at exit )) || !Test if 'sig' is valid signal. Use this instead of testing _NSIG directly ) Then Return -EINVAL
2625  * kargs = (struct kernel_clone_args){flags = flags, pidfd = u64_to_user_ptr(pidfd), child_tid = u64_to_user_ptr(child_tid), parent_tid = u64_to_user_ptr(parent_tid), exit_signal = exit_signal, stack = stack, stack_size = stack_size, tls = tls, Number of elements in *set_tid = set_tid_size, }
2637  If set_tid && copy_from_user(kset_tid, u64_to_user_ptr(set_tid), ( Number of elements in *set_tid * sizeof(pid_t))) Then Return -EFAULT
2642  set_tid = kset_tid
2644  Return 0
Caller
NameDescribe
SYSCALL_DEFINE2lone3 - create a new process with specific properties*@uargs: argument structure*@size: size of @uargs* clone3() is the extensible successor to clone()/clone2().* It takes a struct as argument that is versioned by its size.