android_kernel_motorola_sm6375/drivers/char
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jonas Gorski f5d95a3968 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>
2023-11-20 10:30:12 +01:00
..
agp parisc: sba: Fix compile warning wrt list of SBA devices 2023-10-10 21:46:39 +02:00
hw_random hwrng: geode - fix accessing registers 2023-11-20 10:30:12 +01:00
ipmi ipmi_si: fix a memleak in try_smi_init() 2023-09-23 10:59:54 +02:00
mwave
pcmcia
tpm tpm_tis: Resend command to recover from data transfer errors 2023-09-23 11:00:03 +02:00
xilinx_hwicap
xillybus
adi.c
apm-emulation.c
applicom.c
applicom.h
bsr.c
ds1620.c
dsp56k.c
dtlk.c
efirtc.c
hangcheck-timer.c
hpet.c
Kconfig random: credit cpu and bootloader seeds by default 2022-06-22 14:11:21 +02:00
lp.c
Makefile
mem.c random: restore O_NONBLOCK support 2022-10-15 07:54:40 +02:00
misc.c
mspec.c
nsc_gpio.c
nvram.c
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
powernv-op-panel.c
ppdev.c
ps3flash.c
random.c random: use expired timer rather than wq for mixing fast pool 2022-10-15 07:54:40 +02:00
raw.c
rtc.c
scx200_gpio.c
sonypi.c
tb0219.c
tlclk.c
toshiba.c
ttyprintk.c
uv_mmtimer.c
virtio_console.c