vm/guest: Drop obsoleted entropy-related daemons#68
Open
nicoonoclaste wants to merge 4 commits into
Open
Conversation
khwrngd provides the same functionality as rngd here, but is integrated in 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 <duwe@lst.de>
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.
There are no benefits to having it on the guest, since we use virtio-rng to provide entropy from the host. vm_guest_force_haveged is added to support overriding that, in the special case of vex (which doesn't seem to use virtio-rng, probably because its kernel is too ancient)
Doing otherwise would conflict with vm/guest. Installing it only in vm/host is insufficient: we have physical machines that aren't used as hypervisors, such as wuerfel.
nicoonoclaste
force-pushed
the
no-rngd-no-more
branch
from
February 6, 2020 20:30
a61ab6b to
a51261d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
vm/guest: uninstallrngd: unnecessary for virtio-rng since kernel 3.17, which introduced khwrngd:a kernel thread which provides the same functionality, but is integrated in the kernel, and started by default by the hwrng driver as soon as the device is initialized.
havegedunnecessary on virtual machines, which get their entropy form the host via virtio-rng:vm/guestuninstallhaveged;baseandvm/hostinstallhavegedon physical machines;added a fix to
vm/guestso it could be tested in check mode.