Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17693153ybl; Thu, 2 Jan 2020 10:11:09 -0800 (PST) X-Google-Smtp-Source: APXvYqxaDsSjDtBQvO16hIzEM11Wo96IZYVaaI2Sww+PnGvVpz1ryOC/RQXs8APY3tNVAP9EYUyF X-Received: by 2002:a05:6830:4d9:: with SMTP id s25mr93514115otd.171.1577988669812; Thu, 02 Jan 2020 10:11:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577988669; cv=none; d=google.com; s=arc-20160816; b=qgY8xCvzbTXVZmyNlj6iI19goOcn0sfY5JZ86oeAJUFVCum5fi3F5IBh7gaqVyxElW 1NhtaH/PwvJqULOhxEA6gF1xwZR7CFoZUWfBFMu5Het6Y4NmEMD3k/qW3BUSH7gCNcmo tF9y5f81rExpj9r4GWCLewC8dg3fZOUTpAjFHnORC3h/0nyX+EEjRX1k2s0VHJx5uKe6 KLFVJ72jBgx+YassFHsDPcFcxt0IoFkJUrKWUhiLerUr3Vp6dc7LzmAQHLrRtaZk3qdm 5qkCvc69nglGPdkJsiYyvaiGWZ+3gGrjvLQot8WrL89tkbadi5yv4tyYMxwcZT05+0V8 GvBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=+WiCBow4W/03laYf0EtfbnHK1kZdJ0vgqQ5pDTwt9/A=; b=oyY3fVMFIZsbxmQxDA8faCHiszHHGQm5/IeHAb1d3z4t5GQ97+UszYDQ/f/PJsWXm1 jGakcHl+HegLFUQ57GE2nSu7RvzUsFaQj+5bj0Np3SBH3jXrgch+l3gR9LCwK6X+p+wh 9Q7AxbsQ3Hy/t4/Q8o1i9zs06LLnpicU59LSAeRub7CZE3N0pA3+W/eERO47ii6EbIPV SpqmmtLN5xGDUfNk9VPY6AOjpB/5li+7LuPTJ7GetVydU++53fT96LwO7BPcIOMPzL0i 3Qzua6bHtMh8r0E69JPGnwulzR6LF3UEiwtdaIHceYAgAWBQKxwbMQO/zAi1s6SAZePp 5dsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u12si20701263oiv.13.2020.01.02.10.10.57; Thu, 02 Jan 2020 10:11:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728032AbgABSJI (ORCPT + 99 others); Thu, 2 Jan 2020 13:09:08 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:42502 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727829AbgABSJI (ORCPT ); Thu, 2 Jan 2020 13:09:08 -0500 Received: from [172.58.107.60] (helo=wittgenstein) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1in4u9-0007xR-Uo; Thu, 02 Jan 2020 18:09:06 +0000 Date: Thu, 2 Jan 2020 19:09:02 +0100 From: Christian Brauner To: Amanieu d'Antras Cc: linux-kernel@vger.kernel.org, Christian Brauner , stable@vger.kernel.org Subject: Re: [PATCH 7/7] clone3: ensure copy_thread_tls is implemented Message-ID: <20200102180901.tgtl7wxtq434h5ny@wittgenstein> References: <20200102172413.654385-1-amanieu@gmail.com> <20200102172413.654385-8-amanieu@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200102172413.654385-8-amanieu@gmail.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 02, 2020 at 06:24:13PM +0100, Amanieu d'Antras wrote: > 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: Amanieu d'Antras > Cc: # 5.3.x I'm in favor of this change. But we need to make sure that any arch which now has ARCH_WANTS_SYS_CLONE3 set but doesn't implement copy_thread_tls() is fixed. Once all architectures have clone3() support - and there are just a few by now (IA64 comes to mind) this means we should also be able to get rid of of copy_thread() completely. That seems desirable to me as it makes the codepaths easier to follow. Reviewed-by: Christian Brauner