Linus Torvalds cf833d0b99 random: Use arch_get_random_int instead of cycle counter if avail
We still don't use rdrand in /dev/random, which just seems stupid. We
accept the *cycle*counter* as a random input, but we don't accept
rdrand? That's just broken.

Sure, people can do things in user space (write to /dev/random, use
rdrand in addition to /dev/random themselves etc etc), but that
*still* seems to be a particularly stupid reason for saying "we
shouldn't bother to try to do better in /dev/random".

And even if somebody really doesn't trust rdrand as a source of random
bytes, it seems singularly stupid to trust the cycle counter *more*.

So I'd suggest the attached patch. I'm not going to even bother
arguing that we should add more bits to the entropy estimate, because
that's not the point - I don't care if /dev/random fills up slowly or
not, I think it's just stupid to not use the bits we can get from
rdrand and mix them into the strong randomness pool.

Link: http://lkml.kernel.org/r/CA%2B55aFwn59N1=m651QAyTy-1gO1noGbK18zwKDwvwqnravA84A@mail.gmail.com
Acked-by: "David S. Miller" <davem@davemloft.net>
Acked-by: "Theodore Ts'o" <tytso@mit.edu>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2011-12-29 16:49:45 -08:00
..
2011-03-31 11:26:23 -03:00
2011-05-25 20:43:33 +02:00
2011-11-02 14:15:41 +01:00
2011-03-31 11:26:23 -03:00
2010-10-15 15:53:27 +02:00
2011-02-02 15:28:19 +01:00
2011-07-26 16:49:47 -07:00
2011-03-31 11:26:23 -03:00
2011-09-15 13:55:03 +02:00
2011-01-10 08:51:44 -08:00
2011-03-31 11:26:23 -03:00
2010-10-15 15:53:27 +02:00