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,  <m...@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 at
>>> 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.
> 
> You should do something similar to:
> 
>       http://people.freebsd.org/~pjd/patches/libc_arc4random.c.patch
> 

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.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to