From owner-svn-src-head@FreeBSD.ORG Wed Jul 4 20:02:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 185CA1065672; Wed, 4 Jul 2012 20:02:25 +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 621428FC17; Wed, 4 Jul 2012 20:02:23 +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 q64K2XWo041214; Wed, 4 Jul 2012 23:02:33 +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 q64K2KAa015796; Wed, 4 Jul 2012 23:02:20 +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 q64K2K2Z015795; Wed, 4 Jul 2012 23:02:20 +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:02:20 +0300 From: Konstantin Belousov To: Pawel Jakub Dawidek Message-ID: <20120704200220.GM2337@deviant.kiev.zoral.com.ua> References: <201207041951.q64JpPXu029310@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lU8AdyS7O1+iGTdG" Content-Disposition: inline In-Reply-To: <201207041951.q64JpPXu029310@svn.freebsd.org> 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: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238118 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 20:02:25 -0000 --lU8AdyS7O1+iGTdG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 04, 2012 at 07:51:25PM +0000, Pawel Jakub Dawidek wrote: > Author: pjd > Date: Wed Jul 4 19:51:25 2012 > New Revision: 238118 > URL: http://svn.freebsd.org/changeset/base/238118 >=20 > Log: > Prefer sysctl to open/read/close for obtaining random data. > This method is more sandbox-friendly and also should be faster as only > one syscall is needed instead of three. > In case of an error fall back to the old method. > =20 > Reviewed by: simon, gleb > MFC after: 2 weeks IMO it is weird and against a purpose of sysctl that kern.arand sysctl exists at all. I would prefer to not spread its usage more. We have to keep it to preserve ABI compatibility, but I do not think that the location for random data provider is right, not to mention higher overhead of sysctl machinery. I do think that /dev/random is the right approach, or (less preferable) you could consider adding syscall to get randomness. --lU8AdyS7O1+iGTdG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/0oUwACgkQC3+MBN1Mb4gCVACg0/Qcm2I++ZedlrJt4wkCPjEX UoQAoKn67xRQuCeed+XdR7DL1c/tZcEF =sSVJ -----END PGP SIGNATURE----- --lU8AdyS7O1+iGTdG--