From nobody Sun Dec 05 18:28:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DF3F018B9A0F; Sun, 5 Dec 2021 18:28:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J6Zn33kKJz4g67; Sun, 5 Dec 2021 18:28:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5DA851CF11; Sun, 5 Dec 2021 18:28:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1B5IS7oq004292; Sun, 5 Dec 2021 18:28:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B5IS7TQ004291; Sun, 5 Dec 2021 18:28:07 GMT (envelope-from git) Date: Sun, 5 Dec 2021 18:28:07 GMT Message-Id: <202112051828.1B5IS7TQ004291@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: d03a8d181cfe - stable/13 - randomdev: Remove 100 ms sleep from write routine List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d03a8d181cfedde305602c9285ca4b51fee8562f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638728887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bt1MBCWCJj6K33W0pCu8lV0A29hDPf8wrBPLjSrUSqY=; b=cRU0VgZUlwxCu3K0i+DRMWYe91r3PmoOMdwJo0PnK0ygkfht1S9R/USe8NLclsldsS3Ekv kELzc8pg+bx+jI584BmhaeJ99f7S1sz3JoYJa3rhXMkszhQnRnrEkSMZEKrf9AlGjF/Yl+ 1WNwLVkNDEpOAH0hrSQr0qeQZGhDMmj+2LXfRPvhK00oP/qPC7mhTZbB6OU3snuHL37X/+ NApihyXMlMk8OQBJqTkdPvDp379mKxjYo1iFngPKHPtagLL0Jeup6Bl5R9K1gYpEvJPJij uHkeeLixki6C4Idy03z8FG/9k4sayV9iUIjPSTDuVWnD7zHfu4FVLjzO9RoWyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638728887; a=rsa-sha256; cv=none; b=LVTqUsoQf4djgAbBygBcBzT5ltBTh4b/g4feno+t5as/i0X3FpD3H43WzYS3NVULfrenvZ 32y/MQNnjQmXNpfHgBQOvnYVk/1cffpvwFSUV7aGwyZO0d0fhOzQydKbragNo5CbCh9Ekn Ww/YvKj16BJMk+W1t0pIpLjhhv3k8ekwApxhmp0h7xJxE92U2dhes+TuBQ019HKVZWzud2 yT6xx+ytE8E5cvo0pax9+RJICJOrQshRszY5bqxumw6eXnNmfflU7ax6Q17RtXmp0LLl1S GTiUYqOfJtCg+jbKZYUPm5UZRa/05icieO0iXsSfltEWgI9sqqICEVA0NskTag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=d03a8d181cfedde305602c9285ca4b51fee8562f commit d03a8d181cfedde305602c9285ca4b51fee8562f Author: Colin Percival AuthorDate: 2021-11-13 16:38:09 +0000 Commit: Colin Percival CommitDate: 2021-12-05 18:27:01 +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. Reviewed by: cem Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D32984 (cherry picked from commit 1580afcd6eaf803192f014f3658036cbd49a6e3c) --- 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 4b032cd3feb9..02b92d226417 100644 --- a/sys/dev/random/randomdev.c +++ b/sys/dev/random/randomdev.c @@ -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. */