kernel_samsung_a53x/drivers/char
Jonas Gorski c84f60ba2e hwrng: geode - fix accessing registers
[ 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>
2024-11-18 11:43:02 +01:00
..
agp Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hw_random hwrng: geode - fix accessing registers 2024-11-18 11:43:02 +01:00
ipmi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mwave Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcmcia Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xilinx_hwicap Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xillybus Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
apm-emulation.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
applicom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
applicom.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bsr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ds1620.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dsp56k.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dtlk.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hangcheck-timer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hpet.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
misc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mspec.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nsc_gpio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nvram.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nwbutton.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nwbutton.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nwflash.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pc8736x_gpio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
powernv-op-panel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ppdev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ps3flash.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
random.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
raw.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scx200_gpio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sonypi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tb0219.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tlclk.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
toshiba.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ttyprintk.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uv_mmtimer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virtio_console.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00