opnsense-src/sys/dev/random
Mark Johnston 730b6d166b random: Fix synchronization of hc_source_mask
This variable provides a mask of all registered entropy sources and is
updated when drivers attach and detach (or by sysctl).  However, nothing
was synchronizing accesses to it.  Use the harvest lock to provide
mutual exclusion for updates, and use atomic_load_int() to mark unlocked
reads.

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

(cherry picked from commit c942d9e83ef1122a670bb39736d55fe8f90af83e)
2025-09-30 09:43:08 +00:00
..
fenestrasX random: fxrng: Add an entry for RANDOM_RANDOMDEV to the source table 2025-09-30 09:43:08 +00:00
armv8rng.c random: Make random_source definitions const 2025-08-19 14:06:02 +00:00
build.sh
darn.c random: Make random_source definitions const 2025-08-19 14:06:02 +00:00
fortuna.c
fortuna.h
hash.c
hash.h
ivy.c random: Make random_source definitions const 2025-08-19 14:06:02 +00:00
nehemiah.c random: Make random_source definitions const 2025-08-19 14:06:02 +00:00
other_algorithm.c
other_algorithm.h
random_harvestq.c random: Fix synchronization of hc_source_mask 2025-09-30 09:43:08 +00:00
random_harvestq.h
random_infra.c
randomdev.c random: Treat writes to /dev/random as separate from /entropy 2025-07-18 20:33:06 +00:00
randomdev.h random: Make the entropy source registration interface more uniform 2025-09-30 09:43:08 +00:00
uint128.h
unit_test.c
unit_test.h