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)
Mar 20 2024, 12:01 AM
Unknown Object (File)
Feb 12 2024, 12:17 PM
Unknown Object (File)
Jan 9 2024, 2:07 PM
Unknown Object (File)
Dec 22 2023, 9:53 PM
Unknown Object (File)
Dec 2 2023, 1:28 AM
Unknown Object (File)
Nov 14 2023, 9:43 PM
Unknown Object (File)
Nov 14 2023, 9:37 PM
Unknown Object (File)
Nov 13 2023, 10:20 AM
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.