mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
randomdev: Remove 100 ms sleep from write routine
This was introduced in 2014 along with the comment (which has since
been deleted):
/* Introduce an annoying delay to stop swamping */
Modern cryptographic random number generators can ingest arbitrarily
large amounts of non-random (or even maliciously selected) input
without losing their security.
Depending on the number of "boot entropy files" present on the system,
this can speed up the boot process by up to 1 second.
Reviewed by: cem
Sponsored by: https://www.patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D32984
(cherry picked from commit 1580afcd6e)
This commit is contained in:
parent
3afc5f08a9
commit
d03a8d181c
1 changed files with 0 additions and 1 deletions
|
|
@ -340,7 +340,6 @@ randomdev_write(struct cdev *dev __unused, struct uio *uio, int flags __unused)
|
|||
if (error)
|
||||
break;
|
||||
randomdev_accumulate(random_buf, c);
|
||||
tsleep(p_random_alg_context, 0, "randwr", hz/10);
|
||||
}
|
||||
if (nbytes != uio->uio_resid && (error == ERESTART || error == EINTR))
|
||||
/* Partial write, not error. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue