Commit dd499f7a authored by Amanieu d'Antras's avatar Amanieu d'Antras Committed by Christian Brauner

clone3: ensure copy_thread_tls is implemented

copy_thread implementations handle CLONE_SETTLS by reading the TLS
value from the registers containing the syscall arguments for
clone. This doesn't work with clone3 since the TLS value is passed
in clone_args instead.
Signed-off-by: default avatarAmanieu d'Antras <amanieu@gmail.com>
Cc: <stable@vger.kernel.org> # 5.3.x
Link: https://lore.kernel.org/r/20200102172413.654385-8-amanieu@gmail.comSigned-off-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
parent c346b94f
...@@ -2578,6 +2578,16 @@ SYSCALL_DEFINE5(clone, unsigned long, clone_flags, unsigned long, newsp, ...@@ -2578,6 +2578,16 @@ SYSCALL_DEFINE5(clone, unsigned long, clone_flags, unsigned long, newsp,
#endif #endif
#ifdef __ARCH_WANT_SYS_CLONE3 #ifdef __ARCH_WANT_SYS_CLONE3
/*
* copy_thread implementations handle CLONE_SETTLS by reading the TLS value from
* the registers containing the syscall arguments for clone. This doesn't work
* with clone3 since the TLS value is passed in clone_args instead.
*/
#ifndef CONFIG_HAVE_COPY_THREAD_TLS
#error clone3 requires copy_thread_tls support in arch
#endif
noinline static int copy_clone_args_from_user(struct kernel_clone_args *kargs, noinline static int copy_clone_args_from_user(struct kernel_clone_args *kargs,
struct clone_args __user *uargs, struct clone_args __user *uargs,
size_t usize) size_t usize)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment