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)
Thu, Apr 4, 7:36 PM
Unknown Object (File)
Mar 9 2024, 9:39 AM
Unknown Object (File)
Jan 3 2024, 10:47 AM
Unknown Object (File)
Nov 28 2023, 7:22 PM
Unknown Object (File)
Nov 26 2023, 5:05 AM
Unknown Object (File)
Nov 25 2023, 7:42 PM
Unknown Object (File)
Nov 22 2023, 11:54 AM
Unknown Object (File)
Nov 22 2023, 11:44 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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 19688
Build 19253: arc lint + arc unit

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

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

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

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.