Lines Matching refs:kargs
2935 noinline static int copy_clone_args_from_user(struct kernel_clone_args *kargs, in copy_clone_args_from_user() argument
2941 pid_t *kset_tid = kargs->set_tid; in copy_clone_args_from_user()
2981 *kargs = (struct kernel_clone_args){ in copy_clone_args_from_user()
2996 (kargs->set_tid_size * sizeof(pid_t)))) in copy_clone_args_from_user()
2999 kargs->set_tid = kset_tid; in copy_clone_args_from_user()
3012 static inline bool clone3_stack_valid(struct kernel_clone_args *kargs) in clone3_stack_valid() argument
3014 if (kargs->stack == 0) { in clone3_stack_valid()
3015 if (kargs->stack_size > 0) in clone3_stack_valid()
3018 if (kargs->stack_size == 0) in clone3_stack_valid()
3021 if (!access_ok((void __user *)kargs->stack, kargs->stack_size)) in clone3_stack_valid()
3025 kargs->stack += kargs->stack_size; in clone3_stack_valid()
3032 static bool clone3_args_valid(struct kernel_clone_args *kargs) in clone3_args_valid() argument
3035 if (kargs->flags & in clone3_args_valid()
3043 if (kargs->flags & (CLONE_DETACHED | (CSIGNAL & (~CLONE_NEWTIME)))) in clone3_args_valid()
3046 if ((kargs->flags & (CLONE_SIGHAND | CLONE_CLEAR_SIGHAND)) == in clone3_args_valid()
3050 if ((kargs->flags & (CLONE_THREAD | CLONE_PARENT)) && in clone3_args_valid()
3051 kargs->exit_signal) in clone3_args_valid()
3054 if (!clone3_stack_valid(kargs)) in clone3_args_valid()
3075 struct kernel_clone_args kargs; in SYSCALL_DEFINE2() local
3078 kargs.set_tid = set_tid; in SYSCALL_DEFINE2()
3080 err = copy_clone_args_from_user(&kargs, uargs, size); in SYSCALL_DEFINE2()
3084 if (!clone3_args_valid(&kargs)) in SYSCALL_DEFINE2()
3087 return kernel_clone(&kargs); in SYSCALL_DEFINE2()