]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
random: continually use hwgenerator randomness
authorDominik Brodowski <linux@dominikbrodowski.net>
Tue, 25 Jan 2022 20:14:57 +0000 (21:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Jun 2022 09:46:32 +0000 (11:46 +0200)
commit35e312919dd97bd28b26c035ac892ee4cdba0dde
tree499e94714eaf288d612ad7bc9e243467703a5eeb
parent5c539eee39b2d922a339690edec2f715fb4f1cc1
random: continually use hwgenerator randomness

commit c321e907aa4803d562d6e70ebed9444ad082f953 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/random.c