Re: [PATCH 7/8] random: remove noop function call to xfer_secondary_pool

From: Theodore Ts'o
Date: Wed Jan 18 2017 - 11:11:04 EST


On Tue, Dec 27, 2016 at 11:41:46PM +0100, Stephan Müller wrote:
> Since the introduction of the ChaCha20 DRNG, extract_entropy is only
> invoked with the input_pool. For this entropy pool, xfer_secondary_pool
> is a no-op and can therefore be safely removed.
>
> Signed-off-by: Stephan Mueller <smueller@xxxxxxxxxx>

Instead of doing some minor deletions of single lines, what I want to
do is to look at a more comprehensive refactoring of the code. The
fact that we have extract_entropy() only being used for the input
pool, and extract_entropy_user() ony being used for the non-blocking
pool, is not obvious from the function name and the arguments that
these functions take.

Either the functions should be kept general (so someone else using
them in the future won't get confused about how they work), or they
should be made more speceific. But doing light modifications like
have the danger of causing confusion and bugs in the future.

- Ted