From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 20:50:44 2012 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 24E3F106566B; Wed, 4 Jul 2012 20:50:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 70D078FC18; Wed, 4 Jul 2012 20:50:43 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q64KoqVH043991; Wed, 4 Jul 2012 23:50:52 +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.5/8.14.5) with ESMTP id q64KodfT016125; Wed, 4 Jul 2012 23:50:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q64Kod1A016124; Wed, 4 Jul 2012 23:50:39 +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: Wed, 4 Jul 2012 23:50:39 +0300 From: Konstantin Belousov To: Attilio Rao Message-ID: <20120704205039.GO2337@deviant.kiev.zoral.com.ua> References: <201207041951.q64JpPXu029310@svn.freebsd.org> <20120704200220.GM2337@deviant.kiev.zoral.com.ua> <20120704203239.GA42326@vniz.net> <8344944B-1CEE-4CAD-96FB-EC5A743F6909@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8F/57/tdqD1iFupr" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 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 Cc: src-committers@freebsd.org, Andrey Chernov , svn-src-all@freebsd.org, David Chisnall , svn-src-head@freebsd.org, Pawel Jakub Dawidek , markm@freebsd.org Subject: Re: svn commit: r238118 - head/lib/libc/gen 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: Wed, 04 Jul 2012 20:50:44 -0000 --8F/57/tdqD1iFupr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 04, 2012 at 09:45:54PM +0100, Attilio Rao wrote: > 2012/7/4 David Chisnall : > > On 4 Jul 2012, at 21:32, Andrey Chernov wrote: > > > >> 1) /dev/urandom may not exist in jails/sandboxes while sysctls (or old= way > >> initialization) always exists. > > > > From the perspective of Capsicum sandboxes, a device node is better tha= n a sysctl. The kernel must hard-code policy about which sysctls are permi= tted, but access to file descriptors is decided on a per-sandbox basis and = is configurable by the user. The same applies to jails, although it's slig= htly more effort to make device nodes appear inside a jail. >=20 > Also don't understimate the locking factor here. > I recall that at some point /dev/random was introducing some > scalability penalty on php (maybe related to the suhosin patch) until > kib made shared lookups available on devfs. IIRC, sysctls are still > Giant locked. /dev/random has further optimizations which eliminate the dev_mtx aquisitions as well. KERN_ARND is mpsafe. --8F/57/tdqD1iFupr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/0rJ8ACgkQC3+MBN1Mb4gZOwCZAeP3uUjdRcIxqyJMvUuTCFeY tlAAoI95/UY73VhFCesTtMcC7pnvAclL =/7S7 -----END PGP SIGNATURE----- --8F/57/tdqD1iFupr--