random: tie batched entropy generation to base_crng generation
authorJason A. Donenfeld <Jason@zx2c4.com>
Wed, 9 Feb 2022 21:46:48 +0000 (22:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 May 2022 07:27:05 +0000 (09:27 +0200)
commitd52d9b75cf94a807cfca9c16182849e672fb0668
tree208d5b26523cc5bad7d0c9ccd0d6b0ffea774050
parent432b6e6e60093ebeec6a3972a2fce1412418b6c8
random: tie batched entropy generation to base_crng generation

commit 0791e8b655cc373718f0f58800fdc625a3447ac5 upstream.

Now that we have an explicit base_crng generation counter, we don't need
a separate one for batched entropy. Rather, we can just move the
generation forward every time we change crng_init state or update the
base_crng key.

Cc: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Reviewed-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