Page MenuHomeFreeBSD

abort in srandomdev if kern.arandom sysctl fails
ClosedPublic

Authored by emaste on Oct 3 2016, 1:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 12, 8:20 PM
Unknown Object (File)
Thu, Dec 12, 8:16 PM
Unknown Object (File)
Nov 26 2024, 1:08 AM
Unknown Object (File)
Oct 19 2024, 7:01 PM
Unknown Object (File)
Oct 5 2024, 12:55 PM
Unknown Object (File)
Oct 2 2024, 9:49 PM
Unknown Object (File)
Oct 1 2024, 1:26 AM
Unknown Object (File)
Sep 30 2024, 7:31 PM
Subscribers
None

Details

Reviewers
jonathan
Summary

The sysctl cannot fail. If it does fail on some FreeBSD derivative or after some future change, just abort() so that the problem will be found and fixed.

While abort() is not normally suitable for a library, it makes sense here.

This is akin to D8077 for arc4random.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste retitled this revision from to abort in srandomdev if kern.arandom sysctl fails.
emaste updated this object.
emaste edited the test plan for this revision. (Show Details)
emaste added reviewers: jonathan, ed.
ed edited edge metadata.
This revision is now accepted and ready to land.Oct 3 2016, 4:50 PM
jonathan edited edge metadata.

Looks like a good idea to me. Perhaps it's worthy of a comment explaining why we use abort() within a library? It could contain the same text as at the top of this review, but it might be a slightly surprising thing to discover if you haven't been party to the review.