Page MenuHomeFreeBSD

Fix up the startup/shutdown etc/rc.d/* scripting for random(4)
ClosedPublic

Authored by markm on Jun 27 2015, 9:43 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 16, 5:00 AM
Unknown Object (File)
Tue, Apr 16, 4:05 AM
Unknown Object (File)
Tue, Apr 16, 3:58 AM
Unknown Object (File)
Tue, Apr 16, 3:58 AM
Unknown Object (File)
Tue, Apr 16, 3:48 AM
Unknown Object (File)
Dec 22 2023, 9:24 PM
Unknown Object (File)
Nov 25 2023, 7:47 AM
Unknown Object (File)
Nov 25 2023, 7:06 AM
Subscribers

Details

Summary

The new random(4) needs to have its etc/rc.d/* scripting tightened up.

Diff Detail

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

Event Timeline

markm retitled this revision from to Fix up the startup/shutdown etc/rc.d/* scripting for random(4).
markm updated this object.
markm edited the test plan for this revision. (Show Details)
markm added reviewers: delphij, emaste, imp.

The idea is to commit this when I do D2025 on July 30, 2015.

jilles added inline comments.
etc/rc.d/random
48 ↗(On Diff #6496)

This expands to twice sysctl -n.

share/man/man5/rc.conf.5
4057 ↗(On Diff #6496)

If /boot is a separate filesystem, then this may well be the only thing writing to it regularly. This might affect reliability negatively.

markm added inline comments.
etc/rc.d/random
48 ↗(On Diff #6496)

Oops! Will fix!

share/man/man5/rc.conf.5
4057 ↗(On Diff #6496)

I'm not sure I understand you completely here. Do you mean this may be the only thing stashing entropy regularly, and this will therefore affect random(4) reliability? If so, I'm not sure you are right; there is a cron job adding stuff to /var/db/entropy/ which I intend to extend.

Do you mean that this may be wearing out /boot by excessive writing? If so, is one file write per reboot really that onerous? If so (again), could it go somewhere else?

share/man/man5/rc.conf.5
4057 ↗(On Diff #6496)

I mean that this very slightly increases the risk of /boot getting corrupted. A rather minor issue given the importance of /.

Also, /boot might be read-only, especially in systems that are more like embedded systems.

share/man/man5/rc.conf.5
4057 ↗(On Diff #6496)

Erm, OK, the system owner does have override powers, including the ability to disable its altogether if they wish. Is this acceptable?

This reminds me - I need to ensure the loader scripting is OK too.

Fix script error.

Update default loader.conf.

Update man pages.

markm added inline comments.
share/man/man5/rc.conf.5
4057 ↗(On Diff #6532)

Can we leave this a system-owner configurable?

etc/rc.d/random
127 ↗(On Diff #6532)

The '' part can't happen because of the ${var:=value} expansion. Either remove it or use ${var=value} instead of ${var:=value}.

share/man/man5/rc.conf.5
4057 ↗(On Diff #6532)

Yes.

markm marked 3 inline comments as done.Jul 8 2015, 6:11 PM

Address review comments.

etc/rc.d/random
127 ↗(On Diff #6532)

Fixing similar elsewhere.

markm marked 2 inline comments as done.Jul 8 2015, 6:12 PM
This revision was automatically updated to reflect the committed changes.