android_kernel_samsung_msm8976/drivers/char
Julius Werner 74e28bf732 drivers: char: mem: Fix wraparound check to allow mappings up to the end
commit 32829da54d9368103a2f03269a5120aa9ee4d5da upstream.

A recent fix to /dev/mem prevents mappings from wrapping around the end
of physical address space. However, the check was written in a way that
also prevents a mapping reaching just up to the end of physical address
space, which may be a valid use case (especially on 32-bit systems).
This patch fixes it by checking the last mapped address (instead of the
first address behind that) for overflow.

Fixes: b299cde245 ("drivers: char: mem: Check for address space wraparound with mmap()")
Reported-by: Nico Huber <nico.h@gmx.de>
Signed-off-by: Julius Werner <jwerner@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2019-07-27 21:44:47 +02:00
..
agp agp/intel: Fix typo in needs_ilk_vtd_wa() 2015-08-03 09:29:47 -07:00
diag Merge tag 'LA.BR.1.3.6-05410-8976.0' of https://source.codeaurora.org/quic/la/kernel/msm-3.10 into HEAD 2018-02-06 13:11:45 +01:00
hw_random msm: crypto: Reduce HW PRNG read when in FIPS mode 2015-09-08 04:17:25 -07:00
ipmi ipmi: move timer init to before irq is setup 2016-01-28 21:49:29 -08:00
mwave
pcmcia
tpm This is the 3.10.97 stable release 2017-04-18 17:17:20 +02:00
xilinx_hwicap
Kconfig char: lack of bool string made CONFIG_DEVPORT always on 2019-07-27 21:44:06 +02:00
Makefile Import latest Samsung release 2017-04-18 03:43:52 +02:00
adsprpc.c msm: adsprpc: Use unsigned integer for length values 2018-01-24 16:54:22 +05:30
adsprpc_compat.c msm: adsprpc: Use unsigned integer for length values 2018-01-24 16:54:22 +05:30
adsprpc_compat.h
adsprpc_shared.h msm: adsprpc: Use unsigned integer for length values 2018-01-24 16:54:22 +05:30
apm-emulation.c
applicom.c
applicom.h
bfin-otp.c
bsr.c
ds1302.c
ds1620.c
dsp56k.c
dtlk.c
efirtc.c
generic_nvram.c
genrtc.c
hangcheck-timer.c
hpet.c
i8k.c
knox_kap.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
lp.c
mbcs.c
mbcs.h
mem.c drivers: char: mem: Fix wraparound check to allow mappings up to the end 2019-07-27 21:44:47 +02:00
misc.c
mmtimer.c
msm_smd_pkt.c char: msm_smd_pkt: Fix the TIOCMSET IOCTL argument reading 2016-07-12 01:44:48 -07:00
mspec.c
mst_ctrl.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
nsc_gpio.c
nvram.c
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
ppdev.c
ps3flash.c
random.c BACKPORT: random: Wake up all getrandom(2) callers when pool is ready 2017-09-08 18:50:14 +00:00
raw.c
rdbg.c msm: rdbg: Fix NULL pointer dereference 2015-06-22 10:30:55 -07:00
rtc.c
scx200_gpio.c
snsc.c
snsc.h
snsc_event.c
sonypi.c
tb0219.c
tile-srom.c
tlclk.c
toshiba.c
ttyprintk.c
uv_mmtimer.c
virtio_console.c virtio-console: avoid DMA from stack 2019-07-27 21:44:06 +02:00