acrn-kernel/drivers/char/hw_random
Jason Wang 228432551b virtio-rng: make device ready before making request
Current virtio-rng does a entropy request before DRIVER_OK, this
violates the spec:

virtio spec requires that all drivers set DRIVER_OK
before using devices.

Further, kernel will ignore the interrupt after commit
8b4ec69d7e ("virtio: harden vring IRQ").

Fixing this by making device ready before the request.

Cc: stable@vger.kernel.org
Fixes: 8b4ec69d7e ("virtio: harden vring IRQ")
Fixes: f7f510ec19 ("virtio: An entropy device, as suggested by hpa.")
Reported-and-tested-by: syzbot+5b59d6d459306a556f54@syzkaller.appspotmail.com
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20220608061422.38437-1-jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
2022-06-08 08:56:03 -04:00
..
Kconfig hwrng: cn10k - Enable compile testing 2022-05-06 18:16:55 +08:00
Makefile hwrng: mpfs - add polarfire soc hwrng support 2022-04-15 16:34:28 +08:00
amd-rng.c
arm_smccc_trng.c
atmel-rng.c hwrng: atmel - remove extra line 2022-03-03 10:46:19 +12:00
ba431-rng.c
bcm2835-rng.c
cavium-rng-vf.c hwrng: cavium - fix NULL but dereferenced coccicheck error 2022-03-03 10:49:22 +12:00
cavium-rng.c hwrng: cavium - Check health status while reading random data 2021-11-20 15:02:07 +11:00
cctrng.c
cctrng.h
cn10k-rng.c hwrng: cn10k - Make check_rng_health() return an error code 2022-04-21 17:53:55 +08:00
core.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2022-03-21 16:02:36 -07:00
exynos-trng.c
geode-rng.c
hisi-rng.c
imx-rngc.c
ingenic-rng.c
ingenic-trng.c
intel-rng.c
iproc-rng200.c
ixp4xx-rng.c hwrng: ixp4xx - Make use of the helper function devm_platform_ioremap_resource() 2021-09-17 11:06:14 +08:00
ks-sa-rng.c
meson-rng.c hwrng: meson - Improve error handling for core clock 2021-10-01 14:41:23 +08:00
mpfs-rng.c hwrng: mpfs - add polarfire soc hwrng support 2022-04-15 16:34:28 +08:00
mtk-rng.c hwrng: mtk - Force runtime pm ops for sleep ops 2021-10-08 20:02:47 +08:00
mxc-rnga.c
n2-asm.S
n2-drv.c
n2rng.h
nomadik-rng.c hwrng: nomadik - Change clk_disable to clk_disable_unprepare 2022-03-14 14:45:44 +12:00
npcm-rng.c
octeon-rng.c
omap-rng.c
omap3-rom-rng.c hwrng: omap3-rom - fix using wrong clk_disable() in omap_rom_rng_runtime_resume() 2022-05-20 13:54:45 +08:00
optee-rng.c hwrng: optee - remove redundant initialization to variable rng_size 2022-04-29 13:44:58 +08:00
pasemi-rng.c
pic32-rng.c
powernv-rng.c
pseries-rng.c
s390-trng.c hwrng: s390 - replace snprintf in show functions with sysfs_emit 2021-10-22 20:24:12 +08:00
st-rng.c
stm32-rng.c
timeriomem-rng.c
via-rng.c
virtio-rng.c virtio-rng: make device ready before making request 2022-06-08 08:56:03 -04:00
xgene-rng.c
xiphera-trng.c