opnsense-src/sys/dev/random
Kyle Evans 642701abc8 kern: harvest entropy from callouts
74cf7cae4d ("softclock: Use dedicated ithreads for running callouts.")
switched callouts away from the swi infrastructure.  It turns out that
this was a major source of entropy in early boot, which we've now lost.

As a result, first boot on hardware without a 'fast' entropy source
would block waiting for fortuna to be seeded with little hope of
progressing without manual intervention.

Let's resolve it by explicitly harvesting entropy in callout_process()
if we've handled any callouts.  cc/curthread/now seem to be reasonable
sources of entropy, so use those.

Discussed with:	jhb (also proposed initial patch)
Reported by:	many
Reviewed by:	cem, markm (both csprng)
Differential Revision:	https://reviews.freebsd.org/D34150
2022-02-03 10:05:06 -06:00
..
fenestrasX kern: harvest entropy from callouts 2022-02-03 10:05:06 -06:00
build.sh Remove the Yarrow PRNG algorithm option in accordance with due notice 2018-08-26 12:51:46 +00:00
darn.c random(4): Reorder configuration of random source modules 2019-08-18 16:04:01 +00:00
fortuna.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (18 of many) 2020-02-27 13:12:14 +00:00
fortuna.h random(4): Fortuna: allow increased concurrency 2019-06-17 20:29:13 +00:00
hash.c random(4): Flip default Fortuna generator over to Chacha20 2019-12-20 21:11:00 +00:00
hash.h random(4): Fortuna: allow increased concurrency 2019-06-17 20:29:13 +00:00
ivy.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (18 of many) 2020-02-27 13:12:14 +00:00
nehemiah.c nehemiah: manually assemble xstore(-rng) 2021-10-23 02:31:16 +03:00
other_algorithm.c random(4): Simplify RANDOM_LOADABLE 2019-12-26 19:32:11 +00:00
other_algorithm.h Remove the Yarrow PRNG algorithm option in accordance with due notice 2018-08-26 12:51:46 +00:00
random_harvestq.c kern: harvest entropy from callouts 2022-02-03 10:05:06 -06:00
random_harvestq.h kern: random: drop read_rate and associated functionality 2021-09-23 01:03:01 -05:00
random_infra.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (18 of many) 2020-02-27 13:12:14 +00:00
randomdev.c randomdev: Remove 100 ms sleep from write routine 2021-11-16 10:27:27 -08:00
randomdev.h random(4): Simplify RANDOM_LOADABLE 2019-12-26 19:32:11 +00:00
uint128.h random(4): Fortuna: allow increased concurrency 2019-06-17 20:29:13 +00:00
unit_test.c Remove the Yarrow PRNG algorithm option in accordance with due notice 2018-08-26 12:51:46 +00:00
unit_test.h Remove the Yarrow PRNG algorithm option in accordance with due notice 2018-08-26 12:51:46 +00:00