Page MenuHomeFreeBSD

random: CTASSERT check sizeof random_source_descr[]
ClosedPublic

Authored by obrien on Oct 22 2025, 7:25 AM.
Tags
None
Referenced Files
F145794248: D53255.id165593.diff
Tue, Feb 24, 2:15 PM
Unknown Object (File)
Sat, Feb 21, 4:51 AM
Unknown Object (File)
Sun, Feb 15, 7:27 PM
Unknown Object (File)
Mon, Feb 2, 8:26 PM
Unknown Object (File)
Sun, Feb 1, 11:34 AM
Unknown Object (File)
Fri, Jan 30, 11:21 PM
Unknown Object (File)
Tue, Jan 27, 12:19 PM
Unknown Object (File)
Jan 2 2026, 10:38 AM
Subscribers

Details

Summary

Ensure that the number of elements of random_source_descr[]
of matches that of enum random_entropy_source.

Diff Detail

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

Event Timeline

add checking of fxrng_ent_char[] too

obrien added a subscriber: csprng.
obrien removed a subscriber: csprng.

Otherwise LGTM

sys/dev/random/random_harvestq.c
683

The second assertion probably makes more sense colocated with the definition of ENTROPYSOURCE or hc_source_mask.

sys/dev/random/random_harvestq.c
683

Actually I like that better - less duplication. I didn't touch fenestrasX/fx_pool.c and only added the CTASSERT to my changeset when I found so many missing items.

This revision is now accepted and ready to land.Oct 31 2025, 5:27 AM