|
|
Subscribe / Log in / New account

Really fixing getrandom()

Really fixing getrandom()

Posted Oct 17, 2019 19:53 UTC (Thu) by azumanga (subscriber, #90158)
Parent article: Really fixing getrandom()

Has anyone considered doing this from the very beginning of the kernel start, on every boot (or at least having an option to do that)?

Making sure getrandom() gets initialised seems like a sensible thing to do, and doing it from when the kernel starts (or as early as is reasonable), while the kernel is setting up hardware / running other activities, will increase the randomness and avoid the delay. I can't imagine the overhead introduced will be measurable.


to post comments

Really fixing getrandom()

Posted Oct 18, 2019 12:36 UTC (Fri) by Funcan (subscriber, #44209) [Link] (1 responses)

Sounds like you'd be putting a one second pause early in everybody's boot process rather than a one second pause in the boot processes that need this... not convinced that's a win

Really fixing getrandom()

Posted Oct 18, 2019 12:59 UTC (Fri) by smurf (subscriber, #17840) [Link]

Not if that loop runs at the same time as all the other boot activity.

Really fixing getrandom()

Posted Oct 18, 2019 13:20 UTC (Fri) by ebiederm (subscriber, #35028) [Link]

There are already mechanisms that have in most cases and should continue to do in the future collect enough randomness to initialize the random generator.

The problem is when those mechanisms that we have lots of confidence in don't always provide randomness in a timely manner.

What has been added is something that we have slightly less confidence in that the kernel performs on-demand.

This allows userspace to rely on the kernel to always do the best that it is possible to do in collecting
randomness. Which keeps systems booting and hopefully prevents the generation of predictable long term keys.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds