]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Mar 2020 20:38:18 +0000 (21:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Mar 2020 20:38:18 +0000 (21:38 +0100)
added patches:
csky-implement-copy_thread_tls.patch

queue-5.4/csky-implement-copy_thread_tls.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/csky-implement-copy_thread_tls.patch b/queue-5.4/csky-implement-copy_thread_tls.patch
new file mode 100644 (file)
index 0000000..b6327ed
--- /dev/null
@@ -0,0 +1,56 @@
+From 0b9f386c4be6493d282aab0af6f9b70c62142777 Mon Sep 17 00:00:00 2001
+From: Guo Ren <guoren@linux.alibaba.com>
+Date: Wed, 12 Feb 2020 10:24:52 +0800
+Subject: csky: Implement copy_thread_tls
+
+From: Guo Ren <guoren@linux.alibaba.com>
+
+commit 0b9f386c4be6493d282aab0af6f9b70c62142777 upstream.
+
+This is required for clone3 which passes the TLS value through a
+struct rather than a register.
+
+Cc: Amanieu d'Antras <amanieu@gmail.com>
+Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/csky/Kconfig          |    1 +
+ arch/csky/kernel/process.c |    7 ++++---
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+--- a/arch/csky/Kconfig
++++ b/arch/csky/Kconfig
+@@ -36,6 +36,7 @@ config CSKY
+       select GX6605S_TIMER if CPU_CK610
+       select HAVE_ARCH_TRACEHOOK
+       select HAVE_ARCH_AUDITSYSCALL
++      select HAVE_COPY_THREAD_TLS
+       select HAVE_DYNAMIC_FTRACE
+       select HAVE_FUNCTION_TRACER
+       select HAVE_FUNCTION_GRAPH_TRACER
+--- a/arch/csky/kernel/process.c
++++ b/arch/csky/kernel/process.c
+@@ -34,10 +34,11 @@ unsigned long thread_saved_pc(struct tas
+       return sw->r15;
+ }
+-int copy_thread(unsigned long clone_flags,
++int copy_thread_tls(unsigned long clone_flags,
+               unsigned long usp,
+               unsigned long kthread_arg,
+-              struct task_struct *p)
++              struct task_struct *p,
++              unsigned long tls)
+ {
+       struct switch_stack *childstack;
+       struct pt_regs *childregs = task_pt_regs(p);
+@@ -64,7 +65,7 @@ int copy_thread(unsigned long clone_flag
+                       childregs->usp = usp;
+               if (clone_flags & CLONE_SETTLS)
+                       task_thread_info(p)->tp_value = childregs->tls
+-                                                    = childregs->regs[0];
++                                                    = tls;
+               childregs->a0 = 0;
+               childstack->r15 = (unsigned long) ret_from_fork;
index 7de7263bc15332827fd442866551a7892eac1df9..e339f841b843af4a2766ed3eaeae72f61eafab4f 100644 (file)
@@ -166,3 +166,4 @@ efi-x86-handle-by-ref-arguments-covering-multiple-pages-in-mixed-mode.patch
 efi-read_once-rng-seed-size-before-munmap.patch
 block-bfq-get-a-ref-to-a-group-when-adding-it-to-a-service-tree.patch
 block-bfq-remove-ifdefs-from-around-gets-puts-of-bfq-groups.patch
+csky-implement-copy_thread_tls.patch