lkml.org 
[lkml]   [2022]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] utsname: contribute changes to RNG
On Tue, Sep 27, 2022 at 4:25 PM Kees Cook <keescook@chromium.org>
wrote:> > + add_device_randomness(tmp_data,
sizeof(tmp_data));
>
> Does this matter that we're dumping the same same trailing bytes into
> the RNG? (i.e. only min(lenp, table->maxlen) has changed.)
>
> If that's okay (and maybe a comment should be added):
>
> Reviewed-by: Kees Cook <keescook@chromium.org>

It doesn't matter. You can call add_device_randomness() as often as
you want on whatever data you want, and it is never bad.

I mentioned in my Linux Plumbers talk that I'd like to see various
subsystems add whatever they can find, provided it's not a performance
bottleneck. add_device_randomness() is good for things that /could/ be
random, but might not be. Right after my talk, somebody posted this,
which I was happy to see:
https://lore.kernel.org/all/20220915004117.1562703-2-bryan.odonoghue@linaro.org/

There's also this commit from a few months ago that I was quite happy
about: https://lore.kernel.org/all/20220425205442.1347837-1-linus.walleij@linaro.org/

This one here is part of that same general trend. If you have more
ideas on odd drivers or hooks or whatever else where that might be
useful, feel free to submit patches.

Jason

\
 
 \ /
  Last update: 2022-09-27 16:56    [W:0.529 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site