Theodore Ts'o 775f4b297b random: make 'add_interrupt_randomness()' do something sane
We've been moving away from add_interrupt_randomness() for various
reasons: it's too expensive to do on every interrupt, and flooding the
CPU with interrupts could theoretically cause bogus floods of entropy
from a somewhat externally controllable source.

This solves both problems by limiting the actual randomness addition
to just once a second or after 64 interrupts, whicever comes first.
During that time, the interrupt cycle data is buffered up in a per-cpu
pool.  Also, we make sure the the nonblocking pool used by urandom is
initialized before we start feeding the normal input pool.  This
assures that /dev/urandom is returning unpredictable data as soon as
possible.

(Based on an original patch by Linus, but significantly modified by
tytso.)

Tested-by: Eric Wustrow <ewust@umich.edu>
Reported-by: Eric Wustrow <ewust@umich.edu>
Reported-by: Nadia Heninger <nadiah@cs.ucsd.edu>
Reported-by: Zakir Durumeric <zakir@umich.edu>
Reported-by: J. Alex Halderman <jhalderm@umich.edu>.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
2012-07-14 20:17:28 -04:00
..
2012-03-06 18:46:57 +01:00
2012-05-01 12:00:21 +02:00
2012-05-29 11:53:11 -07:00
2011-03-31 11:26:23 -03:00
2012-05-01 12:00:21 +02:00
2012-05-29 11:53:11 -07:00
2012-05-29 11:53:11 -07:00
2012-01-09 01:03:34 +01:00
2011-03-27 00:09:51 +01:00
2012-05-20 17:27:06 +02:00
2012-05-20 17:27:06 +02:00
2012-05-29 11:53:11 -07:00
2012-05-01 12:35:41 +02:00
2012-03-06 18:46:47 +01:00
2012-05-18 16:54:47 +01:00
2011-05-26 19:45:28 +02:00
2011-05-26 19:45:28 +02:00
2012-06-20 14:39:36 -07:00
2012-06-20 14:39:36 -07:00
2012-01-09 00:37:44 +01:00
2012-05-04 13:25:16 +01:00
2012-05-29 11:53:11 -07:00
2012-05-23 16:24:14 +02:00
2011-03-31 11:26:23 -03:00
2012-05-01 12:00:21 +02:00
2009-09-17 09:46:59 +02:00
2012-03-28 13:56:35 -07:00
2012-05-20 17:27:05 +02:00