Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4106930yba; Mon, 29 Apr 2019 13:53:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMevTKeuuzft54lirSqgyNPBJeBI9AjtKJQ554hs6frmH87h+Bv5mrMrhLpN4O033sODZB X-Received: by 2002:a63:ed12:: with SMTP id d18mr30256358pgi.248.1556571181204; Mon, 29 Apr 2019 13:53:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556571181; cv=none; d=google.com; s=arc-20160816; b=OyaSxr5wysBPJDc7RXxmlPzC1VWHoMZQtT2A8QpUiXekRP9EgRr/XWXawkWauD3sjJ 7XgT9TyfaipZ+bfd2MBUPFBx2BZw0h4qSHnqsFAk1tQgCJsU6L1ZfWwyfgoRb2TuzGN7 NixzwIwE+y8SKVBjXRug7mL97OxMT7bcgvTnA/4Y7DROc+hu6O02WGPYUbIg31DEUEJN zO64UOdYrZDT3Vt0c/osf2oEOJAGwjLpG4ITY/jBFIsJwV1Oc3N8Psd8TvYE8UB0znPs Y1mpLapmcawVuGOCEpYz5veRNE2zSY6Fhr/bH04IewJgu6hXSK04trHinMb3lUnhdbWH lDNA== 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:dkim-signature; bh=5BTG3ToioK+yJqzujw26pVQ5qbb2+Iq3UMr0lsqymLA=; b=UY3oVJ3wIWxbM+GzEiCG7OU7x26NY0A9eMfb5zeXydAVlMo7zoIC1QBdhvFyRITVmn dvZFnXeXmpdN6gHPS1VyWwj9zueUh6Byr0Gz7j0IoGipLSq2GHwQhiGFzi/LXh12Z9io 51YuKiE8QYIBPAvzdLhOzr1CRm6v/YTA8CM4wUg9nKA/rvgRMa+UCau0NQiRbo8bC+F4 DGFpDYLOzXhUxrPaPPlaDlq8PB00c2kiHMg0p/HvH2YWTSGAn0qNHHVUEURJmEemP/CI XV25hyWXVDD57YXDXwwdDUg8kiDqtflqmFB/qWs+Wbplwmm/XNCBkGZ8XZc6ihcKePwM SPhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brauner.io header.s=google header.b=EOuJnQQt; 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 z4si31459294pgp.428.2019.04.29.13.52.45; Mon, 29 Apr 2019 13:53:01 -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=EOuJnQQt; 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 S1729307AbfD2Uvw (ORCPT + 99 others); Mon, 29 Apr 2019 16:51:52 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:33939 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728401AbfD2Uvw (ORCPT ); Mon, 29 Apr 2019 16:51:52 -0400 Received: by mail-lf1-f67.google.com with SMTP id h5so9121390lfm.1 for ; Mon, 29 Apr 2019 13:51:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brauner.io; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5BTG3ToioK+yJqzujw26pVQ5qbb2+Iq3UMr0lsqymLA=; b=EOuJnQQt7qkx4dDVY/1fbGW6T3WZ9JBpZk5tVD6J3SHJvrhnPiFzPoIbicXkZGKNkN mGX0EYnA0q8yagmnytDlIhnGOl/hkr5duDj+b61Nr2ZCd7X+lDAFHqu1eUjFRB1Cze3+ zJak73BLzXwh1w3y6hdfgsuxs17QVf8Ro2bjfijP8uZnFgwZb51UEJfJxhn9DD4jq57/ 5ZnwBghizTPJprglQL33FeJ6j+COd765tAqrBfPMzaszGDioF7QRxJzyJ8WOfBDCd5Rt UVLJ5Wm2r6MFMSd/P8feIvqqccErMacfA7Lt4CWRJUdTWEBVW498VHYoNFkGW6H8QlmR r1WQ== 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=5BTG3ToioK+yJqzujw26pVQ5qbb2+Iq3UMr0lsqymLA=; b=A2J/YwET4zMJkkUGfDIdk3KDjwRgk3R99VlovR9z0rrz2ZPGt1i6iq7eyTj5UNxTsm D2DJk6lia3EPiTZ4lmj6ghELrV1Avaa5sXY+MlNat2Lmqw4f9K/++Xdfgj44Ouwoczo+ FzyWwIM9+wMzjC2WDlZmMZmhyJ9PTJmbwt9mMTMFIfqLpeGYAjy2ZZZsl5QnHH1GJ/6B FohWWOubxbvW75rvHeG02FLlvz1eJya8KNimr9iwu/50oOFTCHUpSGQ/89uqOFwV+y/B Y1z3cHoHrBXcf1wrkyf66nu+smkdS9KZlt5R6fjG3vP/WJ1LQz/+FBIOqyS/TI0+EHOX j1lg== X-Gm-Message-State: APjAAAVPAxROhJGu0rkmn1icOeZrRxyUWSmVEQtitpoxBlw4CO5Qv3kV 2li16Vw5wsKXlfP7XXEsuRcY9fE/JCaVKYAq4Qq91Q== X-Received: by 2002:a19:761a:: with SMTP id c26mr33187686lff.8.1556571110197; Mon, 29 Apr 2019 13:51:50 -0700 (PDT) MIME-Version: 1.0 References: <20190414201436.19502-1-christian@brauner.io> <20190415195911.z7b7miwsj67ha54y@yavin> <20190420071406.GA22257@ip-172-31-15-78> <87zho8bl8x.fsf@oldenburg2.str.redhat.com> In-Reply-To: <87zho8bl8x.fsf@oldenburg2.str.redhat.com> From: Christian Brauner Date: Mon, 29 Apr 2019 22:51:39 +0200 Message-ID: Subject: Re: RFC: on adding new CLONE_* flags [WAS Re: [PATCH 0/4] clone: add CLONE_PIDFD] To: Florian Weimer Cc: Linus Torvalds , Jann Horn , Kevin Easton , Andy Lutomirski , Aleksa Sarai , "Enrico Weigelt, metux IT consult" , Al Viro , David Howells , Linux API , LKML , "Serge E. Hallyn" , Arnd Bergmann , "Eric W. Biederman" , Kees Cook , Thomas Gleixner , Michael Kerrisk , Andrew Morton , Oleg Nesterov , Joel Fernandes , Daniel Colascione 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 Mon, Apr 29, 2019 at 10:38 PM Florian Weimer wrote: > > * Linus Torvalds: > > > On Mon, Apr 29, 2019 at 12:55 PM Jann Horn wrote: > >> > >> ... I guess that already has a name, and it's called vfork(). (Well, > >> except that the Linux vfork() isn't a real vfork().) > > > > What? > > > > Linux vfork() is very much a real vfork(). What do you mean? > > In Linux-as-the-ABI (as opposed to Linux-as-the-implementation), vfork > is sometimes implemented as fork, so applications cannot rely on the > vfork behavior regarding the stopped parent and the shared address > space. > > In fact, it would be nice to have a flag we can check in the posix_spawn > implementation, so that we can support vfork-as-fork without any run > time cost to native Linux. After the next merge window we'll be out of flags if things go as planned. To address this problem, Jann and I are currently in the middle of working on a clone version that we intend to send out for discussion afterwards. If the proposal is acceptable it would bump the number of available flags significantly, putting things like this within reach. Christian