From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 13:15:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D15FC883 for ; Thu, 11 Oct 2012 13:15:16 +0000 (UTC) (envelope-from ache@vniz.net) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3B9E18FC1A for ; Thu, 11 Oct 2012 13:15:16 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so1480109lag.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=pSw30QxCrjaSj2A4mnbo52Eh8ODUb24eZJPXbrQVnGwhaV1a8/ctZ+3QFD5CHXkxL8 GQI9K9ucFiq9ORhZMewA4c+tE7V6gwergW1CKx0hcYTCp9sSHyPdkcvGP1VhUj0+g/bx rj23tS3vJbRSiHkdjOQ4qnW/LB8d44cmLH8V5EMlr3POEIbGmuTnmEgVG+zBI5FzKXeh QuXtJXIxqBkduP51vjCUKGS4bGJv577xpCtKNGPvbgT+5CavAnDyyeyX6YLxX/opcUwu jGeMjDFJo4jln9pILOdyjOFe5CM3E8ZL4pvJLZnhzbU5KnaBHm0jW+EFF3+GimlE9cRW du8A== 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: ALoCoQlX+jlp8xDca68SG1/H6lgpar2gFxlrgePpOG6iuK6CTjzxRYqUqDeVE2qPWbw9CHQMuk5p 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-all@freebsd.org X-Mailman-Version: 2.1.14 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: 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--