Page MenuHomeFreeBSD

random: Make the entropy source registration interface more uniform
ClosedPublic

Authored by markj on Aug 28 2025, 9:47 PM.
Tags
None
Referenced Files
F175514106: D52229.id.diff
Sun, Oct 11, 9:12 AM
Unknown Object (File)
Thu, Oct 1, 3:54 PM
Unknown Object (File)
Thu, Sep 24, 5:07 PM
Unknown Object (File)
Thu, Sep 24, 4:31 AM
Unknown Object (File)
Sep 10 2026, 7:54 PM
Unknown Object (File)
Sep 10 2026, 2:12 AM
Unknown Object (File)
Sep 5 2026, 7:09 PM
Unknown Object (File)
Sep 5 2026, 12:32 PM
Subscribers

Details

Summary

Most pure sources work under a "pull" model wherein a dedicated thread
polls the source at regular intervals (every 100ms). A couple of
sources, however, will instead call random_harvest_direct() to provide
entropy samples. Such sources were not calling random_source_register()
and thus weren't in the global random source list.

Modify "push" sources to use random_source_register() like other sources
do. Such sources omit an implementation of rs_read and are thus skipped
by the above-mentioned thread. This makes it easier to allow pure
sources to provide a min-entropy estimate in a uniform way.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable