Page MenuHomeFreeBSD

random: CTASSERT check sizeof random_source_descr[]
ClosedPublic

Authored by obrien on Oct 22 2025, 7:25 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 13, 11:25 PM
Unknown Object (File)
Thu, Dec 11, 11:16 PM
Unknown Object (File)
Thu, Dec 11, 12:21 PM
Unknown Object (File)
Wed, Dec 10, 12:45 AM
Unknown Object (File)
Tue, Dec 9, 12:00 PM
Unknown Object (File)
Wed, Dec 3, 11:45 PM
Unknown Object (File)
Sun, Nov 30, 1:12 AM
Unknown Object (File)
Tue, Nov 25, 1:41 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 68303
Build 65186: arc lint + arc unit

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
684

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

sys/dev/random/random_harvestq.c
684

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