From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66A2BC33CA9 for ; Mon, 13 Jan 2020 21:54:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 357632072B for ; Mon, 13 Jan 2020 21:54:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TiIXfu/6"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="UY2Q54mY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 357632072B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:From:To: Subject:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=M7Io58ZEhGxjHo17Y8hWVxamttEiEdJZDl3O+0g+FXo=; b=TiIXfu/6AghnWe aJVo9z6xH4Tmd6QvGHfl1AZR3x2CDwvnHPSyLKKWCEk8M2kWLUkgGYLDBfv6esT6r4bWpAazTz4E2 h8Wn8d+WlugVZIV7JrYbmjrDECmoVRNBBETKJy0yFfM/PPPyDQQS0u2uysgPguEasfzpXIctXfTDZ x+dwVaRkV2Rj1kdNqT1ke9avayySpTUL7ERcwpMOnKp7h/UwKo6GC/MAtmZTyBgt4mLGnZTQ7rf9C hMhXbNHayCx6Sr5YGKMMX2xDGCZdeVJvWTu6YOlpQ3bq30yNpowRCp8mCKvh9TU23N7/wFpsFrkRs UOycW9aPYAgUaU1WPVNg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ir7fO-0008GF-UC; Mon, 13 Jan 2020 21:54:34 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ir7fH-000891-O0 for linux-riscv@lists.infradead.org; Mon, 13 Jan 2020 21:54:31 +0000 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C01E62072B; Mon, 13 Jan 2020 21:54:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578952467; bh=uLxaFh3dKd798IEOWwkeImIOAv8m+gsYi3CSsxL7TN0=; h=Subject:To:Cc:From:Date:From; b=UY2Q54mYFFgM+WxGt+OgWeew7qOEjOpLhZHBlVn8RjMya15THVuMwdQSVAP8aRvhv ndqYh8wdCzNn/lxYlxdV8W2Aad+C9+lUdd4bQaGm7LAxGJhg9Jyx7i3wjWSz9OFv7p hU57WbjdAX1kL8SRUMtmwGITmGUSseD1bJP1K8jI= Subject: Patch "riscv: Implement copy_thread_tls" has been added to the 5.4-stable tree To: 20200102172413.654385-6-amanieu@gmail.com, amanieu@gmail.com, christian.brauner@ubuntu.com, gregkh@linuxfoundation.org, linux-riscv@lists.infradead.org From: Date: Mon, 13 Jan 2020 22:53:38 +0100 Message-ID: <1578952418162164@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit X-stable: commit X-Patchwork-Hint: ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200113_135427_874239_709F4175 X-CRM114-Status: GOOD ( 11.16 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stable-commits@vger.kernel.org Sender: "linux-riscv" Errors-To: linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org This is a note to let you know that I've just added the patch titled riscv: 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: riscv-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 know about it. >From 20bda4ed62f507ed72e30e817b43c65fdba60be7 Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Thu, 2 Jan 2020 18:24:11 +0100 Subject: riscv: Implement copy_thread_tls From: Amanieu d'Antras commit 20bda4ed62f507ed72e30e817b43c65fdba60be7 upstream. This is required for clone3 which passes the TLS value through a struct rather than a register. Signed-off-by: Amanieu d'Antras Cc: linux-riscv@lists.infradead.org Cc: # 5.3.x Link: https://lore.kernel.org/r/20200102172413.654385-6-amanieu@gmail.com Signed-off-by: Christian Brauner Signed-off-by: Greg Kroah-Hartman --- arch/riscv/Kconfig | 1 + arch/riscv/kernel/process.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -61,6 +61,7 @@ config RISCV select SPARSEMEM_STATIC if 32BIT select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU select HAVE_ARCH_MMAP_RND_BITS + select HAVE_COPY_THREAD_TLS config ARCH_MMAP_RND_BITS_MIN default 18 if 64BIT --- a/arch/riscv/kernel/process.c +++ b/arch/riscv/kernel/process.c @@ -99,8 +99,8 @@ int arch_dup_task_struct(struct task_str return 0; } -int copy_thread(unsigned long clone_flags, unsigned long usp, - unsigned long arg, struct task_struct *p) +int copy_thread_tls(unsigned long clone_flags, unsigned long usp, + unsigned long arg, struct task_struct *p, unsigned long tls) { struct pt_regs *childregs = task_pt_regs(p); @@ -120,7 +120,7 @@ int copy_thread(unsigned long clone_flag if (usp) /* User fork */ childregs->sp = usp; if (clone_flags & CLONE_SETTLS) - childregs->tp = childregs->a5; + childregs->tp = tls; childregs->a0 = 0; /* Return value of fork() */ p->thread.ra = (unsigned long)ret_from_fork; } Patches currently in stable-queue which might be from amanieu@gmail.com 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