opnsense-src/sys/dev/vmgenc
Mark Johnston 97792a5870 random: Make the entropy source registration interface more uniform
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.

Reviewed by:	cem
MFC after:	2 weeks
Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D52229

(cherry picked from commit 8635f86977638eed966ec59cd319521fffb4df70)
2025-09-30 09:43:08 +00:00
..
vmgenc_acpi.c random: Make the entropy source registration interface more uniform 2025-09-30 09:43:08 +00:00
vmgenc_acpi.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00