Page MenuHomeFreeBSD

random(4): Match enabled sources mask to build options
ClosedPublic

Authored by cem on Sep 20 2018, 5:25 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 18 2024, 7:48 PM
Unknown Object (File)
Sep 25 2024, 8:48 PM
Unknown Object (File)
Sep 25 2024, 8:29 AM
Unknown Object (File)
Sep 24 2024, 3:44 AM
Unknown Object (File)
Sep 22 2024, 8:26 PM
Unknown Object (File)
Sep 22 2024, 6:35 PM
Unknown Object (File)
Sep 21 2024, 8:08 PM
Unknown Object (File)
Sep 21 2024, 2:27 AM
Subscribers

Details

Summary

r287023 and r334450 added build option mechanisms to permanently disable
spammy and/or low quality entropy sources.

Follow-up those changes by updating the 'enabled' sources mask to match.
When sources are compile-time disabled, represent them as disabled in the
source mask, and prevent users from modifying that, like pure sources.
(Modifying the mask bit would have no effect, but users might think it did
if it was not prevented.)

Mostly a cosmetic change.

Test Plan

Reboot and check the systems would be sufficient. Haven't done so yet. It
compiles.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Sep 20 2018, 7:31 AM
gordon added a subscriber: gordon.

Logic looks reasonable to me. I have only read through the logic, not tested it myself.

sys/dev/random/random_harvestq.c
67 ↗(On Diff #48249)

Not generally a fan of double negatives in logic (ETHER_OFF == 0). But no real objection otherwise.

cem marked an inline comment as done.Oct 20 2018, 10:56 PM
cem added inline comments.
sys/dev/random/random_harvestq.c
67 ↗(On Diff #48249)

I'll convert it to single-negative (mask + ~ operator in the use), if that sounds better. I'm also not a fan of double negatives in logic and don't recall why I did it this way.

cem planned changes to this revision.Oct 26 2018, 9:05 PM
cem marked an inline comment as done and an inline comment as not done.Oct 27 2018, 2:43 PM
cem added inline comments.
sys/dev/random/random_harvestq.c
67 ↗(On Diff #48249)

Hm, actually I want to leave it as is. Both uses of the flag need the current sense as-is and I don't want to restructure the code where it is used.

This revision was not accepted when it landed; it landed in state Changes Planned.Oct 27 2018, 3:09 PM
This revision was automatically updated to reflect the committed changes.
cem marked an inline comment as not done.