From owner-svn-src-head@FreeBSD.ORG Thu Oct 11 13:15:17 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 21219886 for ; Thu, 11 Oct 2012 13:15:17 +0000 (UTC) (envelope-from ache@vniz.net) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4B64D8FC1D for ; Thu, 11 Oct 2012 13:15:16 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id b5so1552063lbd.13 for ; Thu, 11 Oct 2012 06:15:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:message-id:disposition-notification-to:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:openpgp :content-type:x-gm-message-state; bh=/KF1iq7M1MlAbCQBa/h5Q7LG9IJnijpsrt7SbcchZIs=; b=mYcmL5GZE1gX/zXhpW8rpcQLwh7T7puuQw4i8NWlJUzjedBBtQUJ/6aX7n27zHoh6M anXLMQ20PyxIgtVl+mDW7PVK9mh2t8uvzRwZbBdHEl1rYUmCgq51M87F0dzMcnAUO26Z yHBFCGGy7KyuDPeM0youko0yuHTWkrtoMeIdgbd4CrNIdIRTzA+X6nRctEe38uC/ObXi vVRAOktWkosV3CNsLgNeFoMnQC8V7iubMENVaIHh+g914TEd2PVWkCvmGRY6t05H2tng EYPNySYsYpbNZbjuA0qEWsztj+mMiVzAgrffXDTc/yhZVIA/msO5qYgsZqSVB1S+AfY8 wXVw== Received: by 10.152.148.8 with SMTP id to8mr860849lab.2.1349961315188; Thu, 11 Oct 2012 06:15:15 -0700 (PDT) Received: from [192.168.1.2] ([89.169.140.97]) by mx.google.com with ESMTPS id mq9sm1348197lab.0.2012.10.11.06.15.14 (version=SSLv3 cipher=OTHER); Thu, 11 Oct 2012 06:15:14 -0700 (PDT) Sender: "Chernov, Andrey" Message-ID: <5076C650.4040508@freebsd.org> Date: Thu, 11 Oct 2012 17:14:56 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: Pawel Jakub Dawidek Subject: Re: svn commit: r241373 - head/lib/libc/stdlib References: <201210091425.q99EPFS6020787@svn.freebsd.org> <507451DE.9060909@freebsd.org> <977E1107-46D4-476F-A04D-AEFD87D1DE53@FreeBSD.org> <20121011114425.GA1562@garage.freebsd.pl> In-Reply-To: <20121011114425.GA1562@garage.freebsd.pl> OpenPGP: id=964474DD Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigEDB188CB1C8DFB9A7472C70D" X-Gm-Message-State: ALoCoQnl/B8eJoq9tjoMyymfHfyJaBoMPbuw+wHwA4/KpMqqkrWTECxHz/fNejIUOM8kWKjZZ+3B Cc: mdf@freebsd.org, src-committers@freebsd.org, Eitan Adler , svn-src-all@freebsd.org, David Chisnall , svn-src-head@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 11 Oct 2012 13:15:17 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigEDB188CB1C8DFB9A7472C70D Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On 11.10.2012 15:44, Pawel Jakub Dawidek wrote: > On Tue, Oct 09, 2012 at 01:51:05PM -0400, Eitan Adler wrote: >> On 9 October 2012 13:27, wrote: >>> The original behavior can be recovered by using inline assembly to >>> fetch the value from a register into a local C variable; this would a= t >>> least not rely on undefined behavior. But I agree it's of dubious >>> value anyways. >> >> I proposed this (with a patch). We want to move to not using >> /dev/random and instead make a kernel system call directly. The patch >> for this is not finished yet though. >=20 > You should do something similar to: >=20 > http://people.freebsd.org/~pjd/patches/libc_arc4random.c.patch >=20 Already half of year I told people of our serious problem with kernel's arc4 (used here in sysctl) - it have very weak initialization at the kernel start (only from processor clock) which is auto-fixed because of its periodic reseeds, but only at the next reseed which happens late. I post two patches (both working, one using atomic, another don't use it) which reseeds kernel's arc4 as fast as we have enough real entropy. NetBSD don't have this problem because of their different kernel's arc4 implementation. --------------enigEDB188CB1C8DFB9A7472C70D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (MingW32) iEYEARECAAYFAlB2xlkACgkQVg5YK5ZEdN1GTgCfQrBR2jQ7BaHPYWeO9AOC3cuv VGgAnR/pAsZeiS1G02DRWPeXiDgKMLvz =gZBy -----END PGP SIGNATURE----- --------------enigEDB188CB1C8DFB9A7472C70D--