Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp738470ybi; Fri, 21 Jun 2019 07:21:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqylVJEmmbr70K78Bbthp9tcbhp1BFj6Ir0z7MQUdBSLguXmGfbc5P1IwUknaBld+lcWw4E3 X-Received: by 2002:a63:1b5c:: with SMTP id b28mr9130742pgm.101.1561126906312; Fri, 21 Jun 2019 07:21:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561126906; cv=none; d=google.com; s=arc-20160816; b=ngWgOB6tHG6DQxWclUPMtTebAlebJXEGJNzEm+jzFF1oXzLBFcNUUQh+68Iwu/ux05 Gkvs2CZjpsdUiFbcvRhk7HUF+2MfOMbgxS2iIxKGo088CHqyozePEoXN6cbnQ6TX6huA ckp85dLKuunCvKO3G6X7iAN8YAzsTIyuOl1y+QdXuK1YIE2rsormNEt7sAB4RqjiDnbc 0EiX2Y16acvt70d1bdGz7MwxUG0yCD3kqRnk9glXChXBUk+2Vbrmb6kyUkue/tqFE1YJ JCHmOCsRExd8FL8JUMFsTd5TlLSvnUf0yB/TQJZt71F4XjBjCDCm66Cen80sz5qkZ2Iw IQ/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=86Rms5nqRiV6IeH+qjixPzoUGmZuw2YR9fMahci1Mdk=; b=jR8Zpe/LGFhSelsLUwLq2uHMWmcu0eck2uC3J12WcAycZD0z7bU5Dpaieh6uXNs6YB 7czelbMXk9XSNKq91RHUGs9rj8HyAZkUqlkQ6p7Nqabq2oN1oywpip3QivSiLrrPITdu BQCcgTLFALcsxv4DFCYmsvZSe1zcLNR6+0oBJMJdIpi3XHhBwHqNWAha3WgwfTCd5tgp Hgp45jSlQ0cqEyZ9IuzovQi6NMo+Ey2bgPV9yPJ3X0VpGI9i1CCdmi0IRvfV7Ss4MpU2 cMoxond+tNe6O7k7ejjMdTROL0LRDCaQm26K7ZQ6n2r79vKTXal+cMXt58Zk3Wsms/Fr 5VGQ== 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 m37si2604875pgl.592.2019.06.21.07.21.31; Fri, 21 Jun 2019 07:21:46 -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; 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 S1726270AbfFUOUd (ORCPT + 99 others); Fri, 21 Jun 2019 10:20:33 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:39489 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725975AbfFUOUd (ORCPT ); Fri, 21 Jun 2019 10:20:33 -0400 Received: by mail-qk1-f195.google.com with SMTP id i125so4518548qkd.6; Fri, 21 Jun 2019 07:20:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=86Rms5nqRiV6IeH+qjixPzoUGmZuw2YR9fMahci1Mdk=; b=fwRELvTAs+c9ke3nijUMNSb4DP0u4Q30iUGCJ29fIsR7AnlS2BW2c8CfupzpIASiiw uwJafIYWY4gR6TncEfarpi9yOQctri1t42X/J8h6amggUngUfoV8urf8AkxQU7rfXI0H 9SudSNYP/30bHxQ7vaIVwrUeRSy7ZmTcK084caACF/bblcoJXieVN2bxTJjVRhe/c6KM LHVmHx/vjRqwLWQ73HToSe0dOmEElChDSDVHw2CnUKTrzAVNActYsi+R02fnUZCnTSNI so29wIrhIjG432AF+cdGpQvme6DbIgNB5CXWkpGvak+N//A9RWebayEL8ls4Q+UNY36G ZzlA== X-Gm-Message-State: APjAAAVI2Sd7r2KzIAV8krHnSjFQ+WTox1qZDMFqMF0iuQhbqjWsFet0 s1r7qq5Xyw4gQx041zM6sxFrvgvK1jjDqszwK+o= X-Received: by 2002:a37:ad12:: with SMTP id f18mr68806622qkm.3.1561126832500; Fri, 21 Jun 2019 07:20:32 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <20190621111839.v5yqlws6iw7mx4aa@brauner.io> From: Arnd Bergmann Date: Fri, 21 Jun 2019 16:20:15 +0200 Message-ID: Subject: Re: [PATCH v3 2/2] arch: wire-up clone3() syscall To: Christian Brauner 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" Content-Type: text/plain; charset="UTF-8" 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 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. Arnd