函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\fork.c Create Date:2022-07-27 09:58:19
Last Modify:2020-03-17 11:04:53 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:copy_clone_args_from_user

函数原型:noinline static int copy_clone_args_from_user(struct kernel_clone_args *kargs, struct clone_args __user *uargs, size_t usize)

返回类型:int

参数:

类型参数名称
struct kernel_clone_args *kargs
struct clone_args __user *uargs
size_tusize
2597  kset_tid等于set_tid
2599  如果此条件成立可能性小(为编译器优化)(usize > PAGE_SIZE)则返回:负E2BIG
2601  如果此条件成立可能性小(为编译器优化)(usize < sizeof first published struct )则返回:负EINVAL
2604  err等于py_struct_from_user: copy a struct from userspace*@dst: Destination address, in kernel space
2605  如果err则返回:err
2608  如果此条件成立可能性小(为编译器优化)(set_tid_size > MAX_PID_NS_LEVEL is needed for limiting size of 'struct pid' )则返回:负EINVAL
2611  如果此条件成立可能性小(为编译器优化)(!set_tid && set_tid_size > 0)则返回:负EINVAL
2614  如果此条件成立可能性小(为编译器优化)(set_tid && set_tid_size == 0)则返回:负EINVAL
2621  如果此条件成立可能性小(为编译器优化)((exit_signal & ~((u64)signal mask to be sent at exit )) || !Test if 'sig' is valid signal. Use this instead of testing _NSIG directly )则返回:负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  如果set_tidcopy_from_user(kset_tid, u64_to_user_ptr(set_tid), ( Number of elements in *set_tid * sizeof(pid_t)))则返回:负EFAULT
2642  set_tid等于kset_tid
2644  返回:0
调用者
名称描述
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.