]> git.baikalelectronics.ru Git - kernel.git/commit
random: continually use hwgenerator randomness
authorDominik Brodowski <linux@dominikbrodowski.net>
Tue, 25 Jan 2022 20:14:57 +0000 (21:14 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 4 Feb 2022 18:22:32 +0000 (19:22 +0100)
commit78f0f7ef8574dbf4a2528ce4c98d6dd68cd52494
tree716a3613f8cb1540f947a4aece0ae81bb960904a
parent93293fe739f5b7e04a7297591be6e918f5dad1b7
random: continually use hwgenerator randomness

The rngd kernel thread may sleep indefinitely if the entropy count is
kept above random_write_wakeup_bits by other entropy sources. To make
best use of multiple sources of randomness, mix entropy from hardware
RNGs into the pool at least once within CRNG_RESEED_INTERVAL.

Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
drivers/char/random.c