HomeFreeBSD

kern: harvest entropy from callouts

Description

kern: harvest entropy from callouts

74cf7cae4d22 ("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

Details

Provenance
kevansAuthored on Feb 3 2022, 4:05 PM
Reviewer
cem
Differential Revision
D34150: kern: harvest entropy from callouts
Parents
rGf026275e26d0: tcp: set IP ECN header codepoint properly
Branches
Unknown
Tags
Unknown