OSDN Git Service

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)
commitc321e907aa4803d562d6e70ebed9444ad082f953
tree716a3613f8cb1540f947a4aece0ae81bb960904a
parentd2a02e3c8bb6b347818518edff5a4b40ff52d6d8
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