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
Unknown Object (File)
Sat, Oct 11, 10:38 PM
Unknown Object (File)
Sat, Oct 11, 10:38 PM
Unknown Object (File)
Sat, Oct 11, 10:38 PM
Unknown Object (File)
Sat, Oct 11, 1:19 PM
Unknown Object (File)
Fri, Oct 3, 2:02 AM
Unknown Object (File)
Thu, Oct 2, 5:40 PM
Unknown Object (File)
Wed, Oct 1, 11:02 AM
Unknown Object (File)
Thu, Sep 25, 7:11 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