Re: [RFC][PATCH] Make cryptoapi non-optional?

Andreas Dilger
2003-08-18T06:44:07Z

On Aug 15, 2003 23:38 -0500, Matt Mackall wrote:
> a) extract_entropy (pool->lock)
>
> For nitpickers, there remains a vanishingly small possibility that
> two readers could get identical results from the pool by hitting a
> window immediately after reseeding, after accounting, _and_ after
> feedback mixing.

It wasn't even vanishingly small... We had a problem in our code where
two readers got the same 64-bit value calling get_random_bytes(), and
we were depending on this 64-bit value being unique. This problem was
fixed by putting a spinlock around the call to get_random_bytes().

Cheers, Andreas
--
Andreas Dilger