c84f60ba2e
[ Upstream commit 464bd8ec2f06707f3773676a1bd2c64832a3c805 ] When the membase and pci_dev pointer were moved to a new struct in priv, the actual membase users were left untouched, and they started reading out arbitrary memory behind the struct instead of registers. This unfortunately turned the RNG into a constant number generator, depending on the content of what was at that offset. To fix this, update geode_rng_data_{read,present}() to also get the membase via amd_geode_priv, and properly read from the right addresses again. Fixes: 9f6ec8dc574e ("hwrng: geode - Fix PCI device refcount leak") Reported-by: Timur I. Davletshin <timur.davletshin@gmail.com> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217882 Tested-by: Timur I. Davletshin <timur.davletshin@gmail.com> Suggested-by: Jo-Philipp Wich <jo@mein.io> Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Sasha Levin <sashal@kernel.org> |
||
---|---|---|
.. | ||
amd-rng.c | ||
atmel-rng.c | ||
ba431-rng.c | ||
bcm2835-rng.c | ||
cavium-rng-vf.c | ||
cavium-rng.c | ||
cctrng.c | ||
cctrng.h | ||
core.c | ||
exynos-trng.c | ||
exyswd-rng.c | ||
geode-rng.c | ||
hisi-rng.c | ||
hisi-trng-v2.c | ||
imx-rngc.c | ||
ingenic-rng.c | ||
ingenic-trng.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 | ||
npcm-rng.c | ||
octeon-rng.c | ||
omap-rng.c | ||
omap3-rom-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 | ||
xiphera-trng.c |