Re: [PATCH v3] random: introduce drain_entropy() helper to declutter crng_reseed()

From: Eric Biggers
Date: Mon Feb 21 2022 - 14:19:52 EST


On Mon, Feb 21, 2022 at 03:49:45PM +0100, Jason A. Donenfeld wrote:
> In preparation for separating responsibilities, break out the entropy
> count management part of crng_reseed() into its own function.
>
> No functional changes.
>
> Cc: Theodore Ts'o <tytso@xxxxxxx>
> Reviewed-by: Dominik Brodowski <linux@xxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Jason A. Donenfeld <Jason@xxxxxxxxx>
> ---
> v3 adjusts the drain_entropy() comment to note that we're only setting
> the entropy count to zero, per Eric's request.
>
> drivers/char/random.c | 36 +++++++++++++++++++++++-------------
> 1 file changed, 23 insertions(+), 13 deletions(-)

Reviewed-by: Eric Biggers <ebiggers@xxxxxxxxxx>

- Eric