diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2022-04-08 18:07:50 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2022-05-07 09:01:48 -0500 |
commit | c5febea0956fd3874e8fb59c6f84d68f128d68f8 (patch) | |
tree | 1fd7c1fa7491beff47fd863dfc89581cd726fc69 /arch/xtensa | |
parent | 343f4c49f2438d8920f1f76fa823ee59b91f02e4 (diff) | |
download | linux-c5febea0956fd3874e8fb59c6f84d68f128d68f8.tar.bz2 |
fork: Pass struct kernel_clone_args into copy_thread
With io_uring we have started supporting tasks that are for most
purposes user space tasks that exclusively run code in kernel mode.
The kernel task that exec's init and tasks that exec user mode
helpers are also user mode tasks that just run kernel code
until they call kernel execve.
Pass kernel_clone_args into copy_thread so these oddball
tasks can be supported more cleanly and easily.
v2: Fix spelling of kenrel_clone_args on h8300
Link: https://lkml.kernel.org/r/20220506141512.516114-2-ebiederm@xmission.com
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'arch/xtensa')
-rw-r--r-- | arch/xtensa/kernel/process.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index e8bfbca5f001..15ce25073142 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c @@ -201,10 +201,12 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) * involved. Much simpler to just not copy those live frames across. */ -int copy_thread(unsigned long clone_flags, unsigned long usp_thread_fn, - unsigned long thread_fn_arg, struct task_struct *p, - unsigned long tls) +int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) { + unsigned long clone_flags = args->flags; + unsigned long usp_thread_fn = args->stack; + unsigned long thread_fn_arg = args->stack_size; + unsigned long tls = args->tls; struct pt_regs *childregs = task_pt_regs(p); #if (XTENSA_HAVE_COPROCESSORS || XTENSA_HAVE_IO_PORTS) |