From owner-svn-src-all@FreeBSD.ORG Sun May 31 12:46:00 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3F60106566C; Sun, 31 May 2009 12:46:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 617F38FC14; Sun, 31 May 2009 12:46:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1MAkQI-0001KK-UV; Sun, 31 May 2009 15:45:59 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n4VCjudM083210 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 31 May 2009 15:45:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n4VCjt7G011160; Sun, 31 May 2009 15:45:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n4VCjt0V011159; Sun, 31 May 2009 15:45:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 31 May 2009 15:45:55 +0300 From: Kostik Belousov To: Jilles Tjoelker Message-ID: <20090531124555.GT1927@deviant.kiev.zoral.com.ua> References: <200905311204.n4VC41GR042549@svn.freebsd.org> <20090531122642.GA18020@stack.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KRI42z441+znMDe3" Content-Disposition: inline In-Reply-To: <20090531122642.GA18020@stack.nl> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.1 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1MAkQI-0001KK-UV e54191725f7a303664b5f17bb18178d5 X-Terabit: YES Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dmitry Chagin Subject: Re: svn commit: r193165 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2009 12:46:01 -0000 --KRI42z441+znMDe3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 31, 2009 at 02:26:42PM +0200, Jilles Tjoelker wrote: > On Sun, May 31, 2009 at 12:04:01PM +0000, Dmitry Chagin wrote: > > Author: dchagin > > Date: Sun May 31 12:04:01 2009 > > New Revision: 193165 > > URL: http://svn.freebsd.org/changeset/base/193165 >=20 > > Log: > > Move new socket flags handling into a separate function as Linux > > introduced more syscalls which uses these flags. >=20 > I think this does not fulfill the purpose of LINUX_SOCK_CLOEXEC exactly: > if another thread forks and execs at the wrong time, it may inherit the > socket without the CLOEXEC flag set. >=20 > The obvious way to fix this is to implement SOCK_CLOEXEC in the native > syscalls, in such a way that other threads can never see the new fd > without the CLOEXEC flag set. >=20 > That could be fairly complicated and it is a pretty rare situation, > however. This is well-known issue, that is omnipresent in the linuxolator. Your analysis is right, but until we implement corresponding facilities for the native ABI, linuxolator will be in is this state. Whether we really need to do the work for freebsd binaries is debatable. For the typical case, see linux_common_open().=20 --KRI42z441+znMDe3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkoifAMACgkQC3+MBN1Mb4heEACdHjkX04k1V/l0phjSPK6S6p+P AQIAoJ7GE0IugwNr9shxAUJsslek2z+G =YiZx -----END PGP SIGNATURE----- --KRI42z441+znMDe3--