mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 14:41:02 +07:00
arm: Implement copy_thread_tls
This is required for clone3 which passes the TLS value through a struct rather than a register. Signed-off-by: Amanieu d'Antras <amanieu@gmail.com> Cc: linux-arm-kernel@lists.infradead.org Cc: <stable@vger.kernel.org> # 5.3.x Link: https://lore.kernel.org/r/20200102172413.654385-4-amanieu@gmail.com Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
a4376f2fbc
commit
167ee0b824
@ -72,6 +72,7 @@ config ARM
|
|||||||
select HAVE_ARM_SMCCC if CPU_V7
|
select HAVE_ARM_SMCCC if CPU_V7
|
||||||
select HAVE_EBPF_JIT if !CPU_ENDIAN_BE32
|
select HAVE_EBPF_JIT if !CPU_ENDIAN_BE32
|
||||||
select HAVE_CONTEXT_TRACKING
|
select HAVE_CONTEXT_TRACKING
|
||||||
|
select HAVE_COPY_THREAD_TLS
|
||||||
select HAVE_C_RECORDMCOUNT
|
select HAVE_C_RECORDMCOUNT
|
||||||
select HAVE_DEBUG_KMEMLEAK
|
select HAVE_DEBUG_KMEMLEAK
|
||||||
select HAVE_DMA_CONTIGUOUS if MMU
|
select HAVE_DMA_CONTIGUOUS if MMU
|
||||||
|
@ -226,8 +226,8 @@ void release_thread(struct task_struct *dead_task)
|
|||||||
asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
|
asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
|
||||||
|
|
||||||
int
|
int
|
||||||
copy_thread(unsigned long clone_flags, unsigned long stack_start,
|
copy_thread_tls(unsigned long clone_flags, unsigned long stack_start,
|
||||||
unsigned long stk_sz, struct task_struct *p)
|
unsigned long stk_sz, struct task_struct *p, unsigned long tls)
|
||||||
{
|
{
|
||||||
struct thread_info *thread = task_thread_info(p);
|
struct thread_info *thread = task_thread_info(p);
|
||||||
struct pt_regs *childregs = task_pt_regs(p);
|
struct pt_regs *childregs = task_pt_regs(p);
|
||||||
@ -261,7 +261,7 @@ copy_thread(unsigned long clone_flags, unsigned long stack_start,
|
|||||||
clear_ptrace_hw_breakpoint(p);
|
clear_ptrace_hw_breakpoint(p);
|
||||||
|
|
||||||
if (clone_flags & CLONE_SETTLS)
|
if (clone_flags & CLONE_SETTLS)
|
||||||
thread->tp_value[0] = childregs->ARM_r3;
|
thread->tp_value[0] = tls;
|
||||||
thread->tp_value[1] = get_tpuser();
|
thread->tp_value[1] = get_tpuser();
|
||||||
|
|
||||||
thread_notify(THREAD_NOTIFY_COPY, thread);
|
thread_notify(THREAD_NOTIFY_COPY, thread);
|
||||||
|
Loading…
Reference in New Issue
Block a user