We periodically ingest entropy from pollable entropy sources, but only 8 bytes at a time and only occasionally enough to feed all of Fortuna's pools once per second. This can result in Fortuna remaining unseeded for a nontrivial amount of time when there is no entropy passed in from the boot loader, even if RDRAND is available to quickly provide a large amount of entropy. Detect in random_sources_feed if we are not yet seeded, and increase the amount of immediate entropy harvesting we perform, in order to "fill" Fortuna's entropy pools and avoid having random: randomdev_wait_until_seeded unblock wait stall the boot process when entropy is available. This speeds up the FreeBSD boot in the Firecracker VM by 2.3 seconds. Approved by: csprng (delphij) Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D35802 |
||
---|---|---|
.. | ||
fenestrasX | ||
build.sh | ||
darn.c | ||
fortuna.c | ||
fortuna.h | ||
hash.c | ||
hash.h | ||
ivy.c | ||
nehemiah.c | ||
other_algorithm.c | ||
other_algorithm.h | ||
random_harvestq.c | ||
random_harvestq.h | ||
random_infra.c | ||
randomdev.c | ||
randomdev.h | ||
uint128.h | ||
unit_test.c | ||
unit_test.h |