From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Weimer Subject: Re: RFC: on adding new CLONE_* flags [WAS Re: [PATCH 0/4] clone: add CLONE_PIDFD] Date: Mon, 29 Apr 2019 22:38:06 +0200 Message-ID: <87zho8bl8x.fsf@oldenburg2.str.redhat.com> References: <20190414201436.19502-1-christian@brauner.io> <20190415195911.z7b7miwsj67ha54y@yavin> <20190420071406.GA22257@ip-172-31-15-78> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: (Linus Torvalds's message of "Mon, 29 Apr 2019 13:21:06 -0700") Sender: linux-kernel-owner@vger.kernel.org To: Linus Torvalds Cc: Jann Horn , Kevin Easton , Andy Lutomirski , Christian Brauner , 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 List-Id: linux-api@vger.kernel.org * 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. Thanks, Florian