Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp810371ybi; Fri, 21 Jun 2019 08:32:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNgt+HECZ/nQZp+LgfP8LXx4Zz18K+Nl9EbIxivgHpLVl0R/Zk81yq7u9wJXI+GCGeQrMo X-Received: by 2002:a17:90a:e397:: with SMTP id b23mr7414025pjz.117.1561131136019; Fri, 21 Jun 2019 08:32:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561131136; cv=none; d=google.com; s=arc-20160816; b=C7Wi4D/buJCLxt1NRKHA085KYtDcEfn/7JrUGVmWvWAEix1D3zn46mgGXcO9OJPX2T BJ7jTrp6QI86+xQRrxbHdxlD1gmLR4W0j4K1MEKLgweNyo1UHll8iFFXdsrsCvT5+FjS ys8frlMpbs2iIAz5UkI9WwkyYdqAev3G7iq40GNbrqW41vUZJUWqEVz0A/Q1jz78/H4P F8RD/50shQeIKf1A73o5bv9aTFGWlm3eoMdf/MEA22BwU3BtOX1TuSD7uM0UsyDmyXub tMOkL1UJM2KV7Xm83ouR8PHzY5XQtjp0+ILOMu6scC76SRgWCox9f1NlD9HbFT0UfTuw PYEQ== 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:dkim-signature; bh=5YZiI+zyweO0ekg0qLNHMbAW8w56yWaJIWuJNWGZdrg=; b=gmehLp+h+1HGh5GYrKhcLvlAiY/yrR4U1ZwBdxrM25fwFTwq2E8MHNjMmP+zwKYZyq wVv4LPdVUNF9Eacm7XRpi7RBAl2ULl8JttuEcKhw7iRx0fS8hvRynxOrSxyr/lKvpRmf sf5ogqNJexUpt2YapMdsKnmAfPOEQrwEBiJbduSbjE9u+Tjm3oOSR5Z2RM6khTE4kfS3 wQRuDpDNeJW4wNfB1r5Ngj7MhqIvCUhBA6PKtaNoDT6K0FQFV9vQWO5mR6EXZbu1Rf4+ hGEN7IQmiv57wwoOI52NI5ETfEr/nFedm/HfACzbuwO+187Ryl85H5YThM9+kmXoIZeB NU4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brauner.io header.s=google header.b=dbXgRwNi; 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 j36si3027960plb.77.2019.06.21.08.32.00; Fri, 21 Jun 2019 08:32:16 -0700 (PDT) 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; dkim=pass header.i=@brauner.io header.s=google header.b=dbXgRwNi; 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 S1726292AbfFUPaT (ORCPT + 99 others); Fri, 21 Jun 2019 11:30:19 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:44139 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726032AbfFUPaS (ORCPT ); Fri, 21 Jun 2019 11:30:18 -0400 Received: by mail-wr1-f68.google.com with SMTP id r16so6980051wrl.11 for ; Fri, 21 Jun 2019 08:30:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brauner.io; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5YZiI+zyweO0ekg0qLNHMbAW8w56yWaJIWuJNWGZdrg=; b=dbXgRwNiGWpZ5dPzPLSjqSh7tCw83/f69jreXjaWR8B2wtYOw9YPmU3lsN9j2es8Ei gRWkwcDnXMd82gOZr6ISqY820b65NQMRy8mIDEmdm+knU1sVfW/YrUbgxv5CXyM0koGm hyGmh+vnwAqc4WIK9HTB5GsGjbEmuhVn41ACwvK6XXpzidzcacXcM/u4Jl2IsLVo8JS+ JH7Xao84vGP3gdM1BvNWl6r1D06nMa4/X9x1Kgn8LqcJzn4sSLj+qPMOwG20Sgbjn3bO DsSuII112vDKrvffk7Vwpv2Ty/QVRWYlMpN7vmsWKazy160tWAdFaQkwUhg7nSpNIb6V 1hDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=5YZiI+zyweO0ekg0qLNHMbAW8w56yWaJIWuJNWGZdrg=; b=uViBR6lweD/zWR/5rNLeupdLaNvr2ho0MyZ+uFPYOLEUo3STAcevj01eFUkxFDwXts Y+/uMhDyBoH3cKfPTl78ZvNK1l/1Uii1WX6q/a9qYXhvqLJuUfMZx36Fokt3/ycP/MvO 5zzmZkSxVSX7asjWKbVoXoBGYn/ndIQQttSy/viZKGZ2PGF3di/9O4GMJY7DnZkRmiEs ZkEyaQsvwcQHsoc2WkwN18aNpuPZdih5YhYSps7PS5VnWA+KxoTOy3adReKfQaPBMwOF KF21tq7APRNxiuvEZN+zTyisV7fhS9UBXVF0l3mH7jJ5nslIx8QV2vZnMYCCslYUW7Tt YYdA== X-Gm-Message-State: APjAAAW7YrQipumrljKgdKK4GK4h6O7bGdKq46uGD6BCzpMJTJ5Shtxd jGueQp+NuDigtYC3yJFayBK/Dw== X-Received: by 2002:a05:6000:124a:: with SMTP id j10mr3737859wrx.191.1561131016526; Fri, 21 Jun 2019 08:30:16 -0700 (PDT) Received: from brauner.io ([212.91.227.56]) by smtp.gmail.com with ESMTPSA id w23sm3178921wmi.45.2019.06.21.08.30.14 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 21 Jun 2019 08:30:15 -0700 (PDT) Date: Fri, 21 Jun 2019 17:30:13 +0200 From: Christian Brauner To: Arnd Bergmann Cc: Guenter Roeck , Al Viro , Linux Kernel Mailing List , Linus Torvalds , Jann Horn , Kees Cook , Florian Weimer , Oleg Nesterov , David Howells , Andrew Morton , Adrian Reber , Linux API , linux-arch , the arch/x86 maintainers , Ley Foon Tan , "moderated list:NIOS2 ARCHITECTURE" Subject: Re: [PATCH v3 2/2] arch: wire-up clone3() syscall Message-ID: <20190621153012.fxwhx25mzmzueqh7@brauner.io> References: <20190604160944.4058-1-christian@brauner.io> <20190604160944.4058-2-christian@brauner.io> <20190620184451.GA28543@roeck-us.net> <20190620221003.ciuov5fzqxrcaykp@brauner.io> <20190621111839.v5yqlws6iw7mx4aa@brauner.io> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 21, 2019 at 04:20:15PM +0200, Arnd Bergmann wrote: > On Fri, Jun 21, 2019 at 1:18 PM Christian Brauner wrote: > > On Fri, Jun 21, 2019 at 11:37:50AM +0200, Arnd Bergmann wrote: > > > > > > I never really liked having __ARCH_WANT_SYS_CLONE here > > > because it was the only one that a new architecture needed to > > > set: all the other __ARCH_WANT_* are for system calls that > > > are already superseded by newer ones, so a new architecture > > > would start out with an empty list. > > > > > > Since __ARCH_WANT_SYS_CLONE3 replaces > > > __ARCH_WANT_SYS_CLONE for new architectures, how about > > > leaving __ARCH_WANT_SYS_CLONE untouched but instead > > > > __ARCH_WANT_SYS_CLONE is left untouched. :) > > > > > coming up with the reverse for clone3 and mark the architectures > > > that specifically don't want it (if any)? > > > > Afaict, your suggestion is more or less the same thing what is done > > here. So I'm not sure it buys us anything apart from future > > architectures not needing to set __ARCH_WANT_SYS_CLONE3. > > > > I expect the macro above to be only here temporarily until all arches > > have caught up and we're sure that they don't require assembly stubs > > (cf. [1]). A decision I'd leave to the maintainers (since even for > > nios2 we were kind of on the fence what exactly the sys_clone stub was > > supposed to do). > > > > But I'm happy to take a patch from you if it's equally or more simple > > than this one right here. > > > > In any case, linux-next should be fine on all arches with this fixup > > now. > > I've looked at bit more closely at the nios2 implementation, and I > believe this is purely an artifact of this file being copied over > from m68k, which also has an odd definition. The glibc side > of nios2 clone() is also odd in other ways, but that appears > to be unrelated to the kernel ABI. > > I think the best option here would be to not have any special > cases and just hook up clone3() the same way on all > architectures, with no #ifdef at all. If it turns out to not work > on a particular architecture later, they can still disable the > syscall then. Hm, if you believe that this is fine and want to "vouch" for it by whipping up a patch that replaces the wiring up done in [1] I'm happy to take it. :) Otherwise I'd feel more comfortable not adding all arches at once. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git/log/?h=clone Christian