(tl;dr at the end)
Paride Legovini dixit:
Ah, you test the older systems from a newer host and with newer
autopkgtest packages?
Then that indeed doesn’t yet need changing for now, as…
did not ship a systemd unit and didn’t really need one except for its
use in autopkgtests, so Sven provided one now, and in bookworm there’s
still the initscript→unit generator, so it should be good now.
Looking at the commit introducing the kernel thread, it landed in
3.17, so 3.13 is indeed older than that and needs rngd.
However you need to be careful: the kernel side of this got fixes
later, and one of the bugs to fix was a busy-spin when *both* the
kernel thread *and* rngd were in use, so it’s only safe to run rngd
with either kernels too old for the hwrng kernel thread at all and
kernels new enough to have this fix, but not those in between. Given
nobody has noticed this yet, I suspect that the distro kernels ship
the bugfix, if necessary.
What kind of input do you provide to rngd? Sven saw it got added in…
https://sources.debian.org/src/autopkgtest/5.42/setup-commands/setup-testbed/?hl=586#L586
… but a quick F3 doesn’t show the package being configured in there.
(rng-tools can also be three different versions…)
If it’s just the automatically detected /dev/hwrng, possibly with
virtio-rng as provider, then I’d appreciate if someone could check
that this will still work sufficiently in sid once rng-tools-debian
2.5 is Installed on the architectures in question as it should then
just not start the rngd dæmon.
In that case, you probably should also check all systems, especially
the very old ones, that they can actually use virtio-rng and make it
available as /dev/hwrng, and that that is enabled (the kernel module
is loaded before the rngd init script / unit is run, in your case it
means in the host before the rng-tools package is installed if the
testbed is run as a chroot, and during testbed startup if it is ran
as virtual machine (I add it to /etc/initramfs-tools/modules and re‐
generate the initramfs, but /etc/modules should also work iff kmod
is started before rng-tools… which it is for sysvinit (kmod is in S
while rng-tools-debian is in 2), no idea about systemd. But since
you have $need_update_initramfs already anyway… that would probably
be the best.
You could also install haveged on systems with older kernels, even
in addition to rng-tools, especially if you cannot guarantee that
virtio-rng is always available and usable. Its entropy quality is
questionable but it should help and this is for testing. I’d not do
that for newer kernels, though.
Note that the Donenfeld patches have been backported to at least
4.9 and I *think* that includes the nōn-blocking-ness of /dev/random,
so if /proc/sys/kernel/random/poolsize is 256, you’ll have that. It
only is nōn-blocking after initialisation though, which does need
sufficient entropy.
────────────────────────────────────────────────────────────────────────
tl;dr: so, for as long as you have kernels that old, keep things
as they are.
But do invest some time into checking what the actual input of
rng-tools is and if it’s supposed to be virtio-rng, make sure
that’s available on the testbeds.
bye,
//mirabilos