[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 4 Apr 2022 18:29:18 +0300
From: Jan Varho <jan.varho@...il.com>
To: "Jason A. Donenfeld" <Jason@...c4.com>
Cc: "Theodore Ts'o" <tytso@....edu>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] random: fix add_hwgenerator_randomness entropy accounting
Hi,
On Mon, Apr 4, 2022 at 6:20 PM Jason A. Donenfeld <Jason@...c4.com> wrote:
> > Fix by not crediting entropy if any input was consumed for fast init.
>
> Yea, I'd seen this and wasn't really sure what the correct fix was. My
> recent addition of `&& entropy < POOL_MIN_BITS` is a step in the right
> direction of making your fix the desirable path, since it makes it less
> likely that we'd wind up throwing away "good" entropy. So maybe it's
> time we do that.
Yes, but since it's a hwrng, hopefully it will supply more soon.
And like you say, the new condition makes it less likely to happen.
> This is untested, but if you want to test it and submit it at v2, I
> think it might be an okay incarnation of the lazy approach.
I thought about doing it that way, but the return value allows
checking that any input was actually used instead of fast init
completing in the mean time.
If you want I can do that.
Jan
Powered by blists - more mailing lists