]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Backport fixes from FreeBSD-12 to help the random(4) device thread
authormarkm <markm@FreeBSD.org>
Sat, 6 Apr 2019 09:00:06 +0000 (09:00 +0000)
committermarkm <markm@FreeBSD.org>
Sat, 6 Apr 2019 09:00:06 +0000 (09:00 +0000)
commit030e1e1ebad4edaebaa0fbc588cb48549ce47274
tree866ed839c4235308cf6a2cc21c1744e7e4903c6f
parentbabe22427090edc47fdda29fc0e67755de425519
Backport fixes from FreeBSD-12 to help the random(4) device thread
not overwhelm the OS:

a) Use the correct symbolic constant when calculating 10'ths of a
second. This means that expensive reseeds happen at ony 1/10 Hz,
not some kHz.

b) Rate limit internal high-rate harveting efforts. This stops the
harvesting thread from total overkilling the high-grade entropy-
gathering work, while still being very conservatively safe.

PR: 230808
Reported by: danilo,eugen
Tested by: eugen
Approved by: so (blanket permission granted as I am the authour of this code)
Relnotes: Yes
sys/dev/random/fortuna.c
sys/dev/random/random_harvestq.c