From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on atuin X-Spam-Level: X-Spam-Status: No, score=0.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 Received: from [127.0.1.1] (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 9371CADE6; Sun, 29 Dec 2019 17:25:06 +0000 (UTC) Received: from mx.braud-santoni.eu (unknown [195.154.61.201]) by atuin.qyliss.net (Postfix) with ESMTPS id E7BB7ADD1 for ; Sun, 29 Dec 2019 17:09:11 +0000 (UTC) Received: from localhost (151.217.235.249 [151.217.235.249]); by mx.braud-santoni.eu (OpenSMTPD) with ESMTPSA id 1c8e036b; TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; for ; Sun, 29 Dec 2019 18:09:08 +0100 (CET) From: Nicolas Braud-Santoni To: devel@spectrum-os.org Subject: [PATCH] start-vm: Remove rngd (unecessary since the introduction of khwrngd) Date: Sun, 29 Dec 2019 18:09:06 +0100 Message-Id: <20191229170906.362205-1-nicoo@debian.org> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MailFrom: nicolas@braud-santoni.eu X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation Message-ID-Hash: PWWGOGS4YCBVV3NJGLUF4XCGNPFQXTCA X-Message-ID-Hash: PWWGOGS4YCBVV3NJGLUF4XCGNPFQXTCA X-Mailman-Approved-At: Sun, 29 Dec 2019 17:25:04 +0000 X-Mailman-Version: 3.2.2 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: khwrngd provides the same functionality as rngd here, but is integrated i= n the kernel, and started by default by the hwrng driver as soon as the device = is initialized. It was added in Linux 3.17 by the following commit: commit be4000bc4644d027c519b6361f5ae3bbfc52c347 Author: Torsten Duwe Date: Sat Jun 14 23:46:03 2014 -0400 hwrng: create filler thread This can be viewed as the in-kernel equivalent of hwrngd; like FUSE it is a good thing to have a mechanism in user land, but for some reasons (simplicity, secrecy, integrity, speed) it may be better to have it in kernel space. This patch creates a thread once a hwrng registers, and uses the previously established add_hwgenerator_randomness() to feed its data to the input pool as long as needed. A derating factor is used to bias the entropy estimation and to disable this mechanism entirely when set to zero. --- start-vm.nix | 8 -------- 1 file changed, 8 deletions(-) diff --git a/start-vm.nix b/start-vm.nix index 442f83a8f45..66fb358cb39 100644 --- a/start-vm.nix +++ b/start-vm.nix @@ -45,14 +45,6 @@ let s6-linux-init-hpr -fr ''; } // services.".s6-svscan" or {}; - - rngd =3D { - run =3D writeScript "rngd-run" '' - #! ${execline}/bin/execlineb -P - ${rng-tools}/bin/rngd -f -x pkcs11,rdrand - ''; - } // services.rngd or {}; - } // services; =20 in --=20 2.24.0