linux/drivers/char
Jonas Gorski a5c83c8043 hwrng: geode - fix accessing registers
[ Upstream commit 464bd8ec2f ]

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: 9f6ec8dc57 ("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>
2023-11-20 11:08:22 +01:00
..
agp parisc: sba: Fix compile warning wrt list of SBA devices 2023-10-06 13:18:15 +02:00
hw_random hwrng: geode - fix accessing registers 2023-11-20 11:08:22 +01:00
ipmi ipmi_si: fix a memleak in try_smi_init() 2023-09-19 12:22:50 +02:00
mwave char/mwave: Adjust io port register size 2022-01-27 11:04:09 +01:00
pcmcia Revert "char: pcmcia: cm4000_cs: Replace mdelay with usleep_range in set_protocol" 2023-03-10 09:39:38 +01:00
tpm tpm_tis: Resend command to recover from data transfer errors 2023-09-23 11:09:56 +02:00
xilinx_hwicap
xillybus char: xillybus: fix a refcount leak in cleanup_dev() 2022-06-14 18:36:21 +02:00
adi.c
apm-emulation.c
applicom.c applicom: Fix PCI device refcount leak in applicom_init() 2023-03-10 09:39:38 +01:00
applicom.h
bsr.c
ds1620.c
dsp56k.c
dtlk.c
hangcheck-timer.c
hpet.c char: hpet: Remove unused variable 'm' 2021-05-21 10:09:30 +02:00
Kconfig random: credit cpu and bootloader seeds by default 2022-06-22 14:21:58 +02:00
lp.c char: lp: remove redundant space around (inside) parenthesized expressions 2021-03-24 08:26:32 +01:00
Makefile remove the raw driver 2021-06-04 15:35:03 +02:00
mem.c random: restore O_NONBLOCK support 2022-10-15 07:59:01 +02:00
misc.c
mspec.c
nsc_gpio.c
nvram.c
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
powernv-op-panel.c powerpc/powernv: Fix fall-through warning for Clang 2021-07-13 19:21:41 -05:00
ppdev.c
ps3flash.c
random.c random: use expired timer rather than wq for mixing fast pool 2022-10-15 07:59:02 +02:00
scx200_gpio.c
sonypi.c
tb0219.c
tlclk.c
toshiba.c module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
ttyprintk.c tty: drop put_tty_driver 2021-07-27 12:17:21 +02:00
uv_mmtimer.c
virtio_console.c virtio_console: eliminate anonymous module_init & module_exit 2022-04-13 20:59:13 +02:00