Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Oct 2012 17:14:56 +0400
From:      Andrey Chernov <ache@freebsd.org>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Cc:        mdf@freebsd.org, src-committers@freebsd.org, Eitan Adler <eadler@freebsd.org>, svn-src-all@freebsd.org, David Chisnall <theraven@freebsd.org>, svn-src-head@freebsd.org
Subject:   Re: svn commit: r241373 - head/lib/libc/stdlib
Message-ID:  <5076C650.4040508@freebsd.org>
In-Reply-To: <20121011114425.GA1562@garage.freebsd.pl>
References:  <201210091425.q99EPFS6020787@svn.freebsd.org> <507451DE.9060909@freebsd.org> <977E1107-46D4-476F-A04D-AEFD87D1DE53@FreeBSD.org> <CAMBSHm8GCDvJCHYcrPBQ6awKWnmNpnS-9YgX1uAoOePjZhf9QA@mail.gmail.com> <CAF6rxgkaoQKdrKBUj1GFcEDtoZ8gM0w68zxn-S2bgJdntp88Kg@mail.gmail.com> <20121011114425.GA1562@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
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,  <mdf@freebsd.org> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5076C650.4040508>