From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1965AC55185 for ; Wed, 22 Apr 2020 17:03:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F06D520776 for ; Wed, 22 Apr 2020 17:03:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726740AbgDVRD0 (ORCPT ); Wed, 22 Apr 2020 13:03:26 -0400 Received: from esgaroth.petrovitsch.at ([78.47.184.11]:4925 "EHLO esgaroth.tuxoid.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726147AbgDVRD0 (ORCPT ); Wed, 22 Apr 2020 13:03:26 -0400 X-Greylist: delayed 1790 seconds by postgrey-1.27 at vger.kernel.org; Wed, 22 Apr 2020 13:03:23 EDT Received: from [10.68.100.236] (h10-gesig.woeg.acw.at [217.116.178.11] (may be forged)) (authenticated bits=0) by esgaroth.tuxoid.at (8.15.2/8.15.2) with ESMTPSA id 03MGVYYO000469 (version=TLSv1 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 22 Apr 2020 18:31:34 +0200 Subject: Re: [PATCH 1/4] fs: Implement close-on-fork To: "Karstens, Nate" , Matthew Wilcox 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 References: <20200420071548.62112-1-nate.karstens@garmin.com> <20200420071548.62112-2-nate.karstens@garmin.com> <20200422154356.GU5820@bombadil.infradead.org> <6ed7bd08892b4311b70636658321904f@garmin.com> From: Bernd Petrovitsch X-Pep-Version: 2.0 Message-ID: <97f05204-a27c-7cc8-429a-edcf6eebaa11@petrovitsch.priv.at> Date: Wed, 22 Apr 2020 16:31:34 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <6ed7bd08892b4311b70636658321904f@garmin.com> Content-Type: multipart/mixed; boundary="------------5C6F5C422D1052E6828086F8" Content-Language: en-US X-DCC-INFN-TO-Metrics: esgaroth.tuxoid.at 1233; Body=22 Fuz1=22 Fuz2=22 X-Virus-Scanned: clamav-milter 0.97 at esgaroth.tuxoid.at X-Virus-Status: Clean Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org This is a multi-part message in MIME format. --------------5C6F5C422D1052E6828086F8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 22/04/2020 16:02, Karstens, Nate wrote: >> It's not safe to call system() from a threaded app. That's all. It's= right there in the DESCRIPTION: >=20 > That is true, but that description is missing from both the Linux man p= age and the glibc documentation (https://www.gnu.org/software/libc/manual= /html_mono/libc.html#Running-a-Command). It seems like a minor point that= won't be noticed until it causes a problem, and problems are rare enough= they might go unnoticed for a while. We have removed system() from our a= pplication, but we're also concerned that libraries we integrate will use= system() without our knowledge. Reimplementing system() is trivial. LD_LIBRARY_PRELOAD should take care of all system(3) calls. I wonder it it has some value to add runtime checking for "multi-threaded" to such lib functions and error out if yes. Apart from that, system() is a PITA even on single/non-threaded apps. MfG, Bernd --=20 There is no cloud, just other people computers. -- https://static.fsf.org/nosvn/stickers/thereisnocloud.svg --------------5C6F5C422D1052E6828086F8 Content-Type: application/pgp-keys; name="pEpkey.asc" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="pEpkey.asc" -----BEGIN PGP PUBLIC KEY BLOCK----- mQGNBFss+8cBDACpXlq0ZC9Qp8R+iFPx5vDPu12FpnmbbV8CwexVDchdizF2qz+A PFh12RrkE6yudI0r7peAIRePiSVYqv8XT82TpJM+tbTYk/MSQaPhcmz8jl1HaKv0 q8g5nKtr42qRsswU7Q2Sa6mWXaIdOisPYZ9eLZC9BDBhI/YrgdAwszyYJ1HUwNkp Dw5i4wW/SsIKrotCboYzbBjZfHbmDJr4dFYSoMg5jQVHD2Yz8fqNSoRyd7i/oicn 1bH/DjEkrmIu9YuptuHYmblpCRo5dLww7kgszNw12j8Iljp64uJ/uz5+asBUmRZM mGey82BB1DnIvy1v+GnbGWFIYy79/HeqdN+KbOgO/sXoqYKS5KJ6aSqWOLTQk6sv AnDN2PNF5jOB9ROCNwoQSH/YNEfMd/mQ5pGB0UJ4ykD0UnjW7DdXbVOwvwWzfHF7 HaZXB1NMpBzHxold3W19DThd4HECvXYZ6Au6p0WE8IfABS11CzbX7KJuD5Ua+xKG 3W05fMg5i0td2aMAEQEAAbQtQmVybmQgUGV0cm92aXRzY2ggPGJlcm5kQHBldHJv dml0c2NoLnByaXYuYXQ+iQHUBBMBCgA+AhsDBQsJCAcDBRUKCQgLBRYDAgEAAh4B AheAFiEEgDWyyHEwksebo557hUq7AhBHKGYFAl0HmCMFCQO7nFkACgkQhUq7AhBH KGZCIQv+Li5U6ZfZ21JJPPzcV4JOq9nzz5YvJpPBwOtDgiDfsJ1WuSjJD0KpeCLh nxeTnGM1PwdjtXBImstZfDOX/IH/iiNgWLNz80KKx03yH40tDTPthZ/x5DVIm8Fb n4GmGqfTFQCR8km7sNPC1YUOUrQf1FevYq/F/tHsifiisEay4547aN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