git: c1d34c9c79f3 - stable/12 - randomdev: Remove 100 ms sleep from write routine
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 18 Feb 2022 04:54:55 UTC
The branch stable/12 has been updated by obrien: URL: https://cgit.FreeBSD.org/src/commit/?id=c1d34c9c79f3fb094ad7f34d7f65040f1472c038 commit c1d34c9c79f3fb094ad7f34d7f65040f1472c038 Author: Colin Percival <cperciva@FreeBSD.org> AuthorDate: 2021-11-13 16:38:09 +0000 Commit: David E. O'Brien <obrien@FreeBSD.org> CommitDate: 2022-02-18 04:09:48 +0000 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. (cherry picked from commit 1580afcd6eaf803192f014f3658036cbd49a6e3c) (cherry picked from commit d03a8d181cfedde305602c9285ca4b51fee8562f) --- sys/dev/random/randomdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/random/randomdev.c b/sys/dev/random/randomdev.c index f1ed80cc02f1..c9699e7cd251 100644 --- a/sys/dev/random/randomdev.c +++ b/sys/dev/random/randomdev.c @@ -356,7 +356,6 @@ randomdev_write(struct cdev *dev __unused, struct uio *uio, int flags __unused) if (error) break; randomdev_accumulate(random_buf, c); - tsleep(&random_alg_context, 0, "randwr", hz/10); } if (nbytes != uio->uio_resid && (error == ERESTART || error == EINTR)) /* Partial write, not error. */