mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 20:45:20 +07:00
78887832e7
add_early_randomness() is called by hwrng_register() when the
hardware is added. If this hardware and its module are present
at boot, and if there is no data available the boot hangs until
data are available and can't be interrupted.
For instance, in the case of virtio-rng, in some cases the host can be
not able to provide enough entropy for all the guests.
We can have two easy ways to reproduce the problem but they rely on
misconfiguration of the hypervisor or the egd daemon:
- if virtio-rng device is configured to connect to the egd daemon of the
host but when the virtio-rng driver asks for data the daemon is not
connected,
- if virtio-rng device is configured to connect to the egd daemon of the
host but the egd daemon doesn't provide data.
The guest kernel will hang at boot until the virtio-rng driver provides
enough data.
To avoid that, call rng_get_data() in non-blocking mode (wait=0)
from add_early_randomness().
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Fixes:
|
||
---|---|---|
.. | ||
amd-rng.c | ||
atmel-rng.c | ||
bcm2835-rng.c | ||
cavium-rng-vf.c | ||
cavium-rng.c | ||
core.c | ||
exynos-trng.c | ||
geode-rng.c | ||
hisi-rng.c | ||
imx-rngc.c | ||
intel-rng.c | ||
iproc-rng200.c | ||
ixp4xx-rng.c | ||
Kconfig | ||
ks-sa-rng.c | ||
Makefile | ||
meson-rng.c | ||
mtk-rng.c | ||
mxc-rnga.c | ||
n2-asm.S | ||
n2-drv.c | ||
n2rng.h | ||
nomadik-rng.c | ||
octeon-rng.c | ||
omap3-rom-rng.c | ||
omap-rng.c | ||
optee-rng.c | ||
pasemi-rng.c | ||
pic32-rng.c | ||
powernv-rng.c | ||
pseries-rng.c | ||
s390-trng.c | ||
st-rng.c | ||
stm32-rng.c | ||
timeriomem-rng.c | ||
tx4939-rng.c | ||
via-rng.c | ||
virtio-rng.c | ||
xgene-rng.c |