Re: random pool entropy starvation in initrd with parse-kickstart

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/24/2015 08:26 AM, Brian C. Lane wrote:
On Tue, Nov 24, 2015 at 07:11:10AM -0800, John Reiser wrote:
On 11/23/2015 03:08 PM, Brian C. Lane wrote:
   [[snip]]
If parse-kickstart is run before the kernel initializes the nonblocking
random pool it appears to starve the system and it takes anywhere from
several minutes to forever for the pool to be initialized and for the
boot to continue.
    [[snip]]

How many execve()?  Each consumes 16 bytes from the pool for AT_RANDOM.
A shell script that invokes helper utility programs instead of builtin
string operations is one likely culprit.

Unknown, but presumably way more than 1 since it is dracut running at this point.

Some pieces of dracut have been written to avoid execve(). [I did some work for
40network/module-setup.sh.]  Other pieces have not.  As you have discovered,
the result is a voracious appetite for entropy for AT_RANDOM.

One palliative is to fork() a process which uses its own AT_RANDOM
to seed a pseudo-random number generator.  Then call the generator
periodically, and "donate" some of the results to the entropy pool.

Another possibility would be to rewrite dracut in python.  Builtin
and library functions probably could reduce execve() by a factor.
Replace many of the dracut shell's execve() with a call to a python
function which avoids execve().







_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list



[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux