Page MenuHomeFreeBSD

Fix excessive reseed rate in random(4).
ClosedPublic

Authored by markm on Aug 23 2018, 4:46 PM.
Tags
None
Referenced Files
F167557530: D16872.id47234.diff
Sat, Aug 22, 4:14 PM
F167548306: D16872.id47181.diff
Sat, Aug 22, 3:07 PM
Unknown Object (File)
Fri, Aug 21, 3:11 PM
Unknown Object (File)
Fri, Aug 21, 2:32 PM
Unknown Object (File)
Thu, Aug 20, 4:09 PM
Unknown Object (File)
Fri, Aug 14, 7:05 PM
Unknown Object (File)
Tue, Aug 11, 4:35 PM
Unknown Object (File)
Tue, Aug 11, 1:27 PM
Subscribers

Details

Summary

Fix braino of mine where the reseeds would happen far too often, making the kernel process way too busy.
PR: 230808
Submitted by: Conrad Meyer <cem@FreeBSD.org>
Reported by: Danilo Egea Gondolfo <danilo@FreeBSD.org>

Test Plan

Make the PRNG work hard while doing something intensive like "make
world". To make the PRNG work hard, do e.g.
$ dd if=/dev/random of=/dev/null bs=$((1024*1024))

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 19105
Build 18732: arc lint + arc unit

Event Timeline

Apologies to delphij for abandoning the previous identical-looking commit. I was making a pig's ear of the archanist work.

LGTM from an earlier review.

This revision is now accepted and ready to land.Aug 23 2018, 5:08 PM

Copied from earlier review D16866:

This one looks obviously correct to me. Go ahead and commit it. It fixes a security weakness in our implementation relative to spec Fortuna, so I'd be sure to tag the commit with "Security: yes."

Thanks folks! Tinderbox build going, then I'll commit.

This revision was automatically updated to reflect the committed changes.