From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: [PATCH 1/4] fs: Implement close-on-fork Date: Wed, 22 Apr 2020 08:43:56 -0700 Message-ID: <20200422154356.GU5820@bombadil.infradead.org> References: <20200420071548.62112-1-nate.karstens@garmin.com> <20200420071548.62112-2-nate.karstens@garmin.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726154AbgDVPoE (ORCPT ); Wed, 22 Apr 2020 11:44:04 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: "Karstens, Nate" Cc: Alexander Viro , Jeff Layton , "J. Bruce Fields" , Arnd Bergmann , Richard Henderson , Ivan Kokshaysky , Matt Turner , "James E.J. Bottomley" , Helge Deller , "David S. Miller" , Jakub Kicinski , "linux-fsdevel@vger.kernel.org" , "linux-arch@vger.kernel.org" , "linux-alpha@vger.kernel.org" , "linux-parisc@vger.kernel.org" , "sparclinux@vger.kernel.org" "netdev@vger.kernel.org" On Wed, Apr 22, 2020 at 03:36:09PM +0000, Karstens, Nate wrote: > There was some skepticism about whether our practice of > closing/reopening sockets was advisable. Regardless, it does expose what > I believe to be something that was overlooked in the forking process > model. We posted two solutions to the Austin Group defect tracker: I don't think it was "overlooked" at all. It's not safe to call system() from a threaded app. That's all. It's right there in the DESCRIPTION: The system() function need not be thread-safe. https://pubs.opengroup.org/onlinepubs/9699919799/functions/system.html > Ultimately the Austin Group felt that close-on-fork > was the preferred approach. I think it's also worth > pointing that out Solaris reportedly has this feature > (https://www.mail-archive.com/austin-group-l@opengroup.org/msg05359.html). I am perplexed that the Austin Group thought this was a good idea. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726154AbgDVPoE (ORCPT ); Wed, 22 Apr 2020 11:44:04 -0400 Date: Wed, 22 Apr 2020 08:43:56 -0700 From: Matthew Wilcox Subject: Re: [PATCH 1/4] fs: Implement close-on-fork Message-ID: <20200422154356.GU5820@bombadil.infradead.org> References: <20200420071548.62112-1-nate.karstens@garmin.com> <20200420071548.62112-2-nate.karstens@garmin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: "Karstens, Nate" Cc: Alexander Viro , Jeff Layton , "J. Bruce Fields" , Arnd Bergmann , Richard Henderson , Ivan Kokshaysky , Matt Turner , "James E.J. Bottomley" , Helge Deller , "David S. Miller" , Jakub Kicinski , "linux-fsdevel@vger.kernel.org" , "linux-arch@vger.kernel.org" , "linux-alpha@vger.kernel.org" , "linux-parisc@vger.kernel.org" , "sparclinux@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , David Laight , Changli Gao Message-ID: <20200422154356.2byt4C6CEt__h-bCsFyivbhg0VjOH0OTb08YEhHB16g@z> On Wed, Apr 22, 2020 at 03:36:09PM +0000, Karstens, Nate wrote: > There was some skepticism about whether our practice of > closing/reopening sockets was advisable. Regardless, it does expose what > I believe to be something that was overlooked in the forking process > model. We posted two solutions to the Austin Group defect tracker: I don't think it was "overlooked" at all. It's not safe to call system() from a threaded app. That's all. It's right there in the DESCRIPTION: The system() function need not be thread-safe. https://pubs.opengroup.org/onlinepubs/9699919799/functions/system.html > Ultimately the Austin Group felt that close-on-fork > was the preferred approach. I think it's also worth > pointing that out Solaris reportedly has this feature > (https://www.mail-archive.com/austin-group-l@opengroup.org/msg05359.html). I am perplexed that the Austin Group thought this was a good idea.