From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 9 11:41:36 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4EE0EA1 for ; Wed, 9 Apr 2014 11:41:36 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B12C1ACA for ; Wed, 9 Apr 2014 11:41:35 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.8/8.14.8) with ESMTP id s39BfVU3064068; Wed, 9 Apr 2014 14:41:31 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua s39BfVU3064068 Received: (from kostik@localhost) by tom.home (8.14.8/8.14.8/Submit) id s39BfVDp064067; Wed, 9 Apr 2014 14:41:31 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 9 Apr 2014 14:41:31 +0300 From: Konstantin Belousov To: Mateusz Guzik Subject: Re: pipe() resource exhaustion Message-ID: <20140409114131.GJ21331@kib.kiev.ua> References: <20140408130206.e75f3bf6c6df28b6e4839e70@yahoo.es> <20140408121222.GB30326@dft-labs.eu> <20140408123827.GW21331@kib.kiev.ua> <20140408130727.GA11363@dft-labs.eu> <20140408132442.GZ21331@kib.kiev.ua> <20140409111654.GA17650@dft-labs.eu> <20140409112627.GI21331@kib.kiev.ua> <20140409113957.GB17650@dft-labs.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="djsmrO0QNMuttZWM" Content-Disposition: inline In-Reply-To: <20140409113957.GB17650@dft-labs.eu> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: freebsd-hackers@freebsd.org, Eduardo Morras X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2014 11:41:36 -0000 --djsmrO0QNMuttZWM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 09, 2014 at 01:39:57PM +0200, Mateusz Guzik wrote: > On Wed, Apr 09, 2014 at 02:26:27PM +0300, Konstantin Belousov wrote: > > > if (backing) { > > > + /* > > > + * Note that these functions can fail, but we ignore > > > + * the error as it is not fatal and could be provoked > > > + * by users. > > > + */ > > It would be benefitial to add some more details on the way to provoke t= he > > failure. Note in the comment that creating too much pipes would exhaust > > pipe map and we fall back to the buffer pipe creation there, which still > > work correctly, albeit slow. > >=20 >=20 > How about: >=20 > Note that these functions can fail if pipe map is exhausted (as a result > of too many pipes created), but we ignore the error as it is not fatal > and could be provoked by unprivileged users. The only consequence is worse > performance with given pipe. Ok. --djsmrO0QNMuttZWM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJTRTHrAAoJEJDCuSvBvK1BUkgP/RaaBpu0dswBiovm8tSnA+ZD 32Cfms82IaJnY/X30JqYNIUyQT7uUMDo1yI6Ij1bnC/dJBbSrjIlUud6gBJebXbA 28qUUmZ100lhKj9y+Zt9dGpRXP11atuX9VgboqTpeE/e3S6Al1oSbKu0qPNh1Ggt Cdbe1to1/heDxNcCLVOqlmfSnnfMtsTF5wicnmSdnbt839IBCRpVgndm8ErvCrW2 VVFATL+Z4Qwnk3rhlfnDJncF3fLZGF8ayPQRBtI3jo3O/fR5ETqidsvu1Fq3gOFS u7qNXcMk3c/zvRPu7pc6ZVTu5Up3HkZ+iJtJo8nBw+DofnfFzi3mEHJJqjw/lFaS 7SpHaSUaGzFSdmG7irWmG19yV4a49STu7+3n7wyJMcqI6djf/NUaytjjSArqnsIk rLTuv5CC3PwfNckGaq3SRLo+KKOyExb9qeBm8xypXoL0u1L+dcB7jW37ItUwEkgV ifdPDQSW+OmPIStvufyF077LIppxAoYU8wgiyvrV5r3+qQofKVI15CLhbw6yAEEt g8jw3mWohzS0WcMZRfJK65MZ1K0xATgpAYDlWpe49AR7PZRCPfpXdym0bNpG72SY uPlK/9HZrGw6dqS7EQ2DIEN7qkwd13J8nFuGXJ75dO0ee5oFqMyQv5hzcz1hUfoB 3FyJeiyzfrYSf0vcnOnD =0/Fo -----END PGP SIGNATURE----- --djsmrO0QNMuttZWM--