Patch "arm64: Implement copy_thread_tls" has been added to the 5.4-stable tree
[email protected]
AppliedThis is a note to let you know that I've just added the patch titled
arm64: Implement copy_thread_tls
to the 5.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
arm64-implement-copy_thread_tls.patch
and it can be found in the queue-5.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
From a4376f2fbcc8084832f2f114577c8d68234c7903 Mon Sep 17 00:00:00 2001
From: Amanieu d'Antras <[email protected]>
Date: Thu, 2 Jan 2020 18:24:08 +0100
Subject: arm64: Implement copy_thread_tls
From: Amanieu d'Antras <[email protected]>
commit a4376f2fbcc8084832f2f114577c8d68234c7903 upstream.
This is required for clone3 which passes the TLS value through a struct rather than a register.
--- arch/arm64/Kconfig | 1 + arch/arm64/kernel/process.c | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-)
arch/arm64/Kconfig +1 -0
@@ -139,6 +139,7 @@ config ARM64 select HAVE_CMPXCHG_DOUBLE select HAVE_CMPXCHG_LOCAL select HAVE_CONTEXT_TRACKING + select HAVE_COPY_THREAD_TLS select HAVE_DEBUG_BUGVERBOSE select HAVE_DEBUG_KMEMLEAK select HAVE_DMA_CONTIGUOUS
arch/arm64/kernel/process.c +5 -5
@@ -360,8 +360,8 @@ int arch_dup_task_struct(struct task_str asmlinkage void ret_from_fork(void) asm("ret_from_fork"); -int copy_thread (unsigned long clone_flags,unsigned long stack_start, -unsigned long stk_sz,struct task_struct *p) +int copy_thread_tls (unsigned long clone_flags,unsigned long stack_start, +unsigned long stk_sz,struct task_struct *p,unsigned long tls) {struct pt_regs *childregs =task_pt_regs (p);
@@ -394,11 +394,11 @@ int copy_thread(unsigned long clone_flag }/* -* If a TLS pointer was passed to clone (4th argument), use it -* for the new thread. +* If a TLS pointer was passed to clone, use it for the new +* thread. */ if (clone_flags &CLONE_SETTLS ) - p->thread.uw.tp_value = childregs->regs[3 ]; + p->thread.uw.tp_value = tls; }else {memset (childregs,0 ,sizeof (struct pt_regs )); childregs->pstate = PSR_MODE_EL1h;
Patches currently in stable-queue which might be from [email protected] are
queue-5.4/arm-implement-copy_thread_tls.patch queue-5.4/arm64-implement-copy_thread_tls.patch queue-5.4/xtensa-implement-copy_thread_tls.patch queue-5.4/arm64-move-__arch_want_sys_clone3-definition-to-uapi-headers.patch queue-5.4/parisc-implement-copy_thread_tls.patch queue-5.4/clone3-ensure-copy_thread_tls-is-implemented.patch queue-5.4/riscv-implement-copy_thread_tls.patch queue-5.4/um-implement-copy_thread_tls.patch
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel