lkml.org 
[lkml]   [2022]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH] random: fix add_hwgenerator_randomness entropy accounting
    Hi,

    On Mon, Apr 4, 2022 at 6:20 PM Jason A. Donenfeld <Jason@zx2c4.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

    \
     
     \ /
      Last update: 2022-04-04 17:30    [W:3.176 / U:0.336 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site