qemu-e2k/linux-user
Richard Henderson 605a8b5491 linux-user: Avoid mmap of the last byte of the reserved_va
There is an overflow problem in mmap_find_vma_reserved:
when reserved_va == UINT32_MAX, end may overflow to 0.
Rather than a larger rewrite at this time, simply avoid
the final byte of the VA, which avoids searching the
final page, which avoids the overflow.

Cc: qemu-stable@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1741
Fixes: 95059f9c ("include/exec: Change reserved_va semantics to last byte")
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Message-Id: <20230629080835.71371-1-richard.henderson@linaro.org>
2023-07-01 08:33:08 +02:00
..
aarch64
alpha
arm include/exec: Change reserved_va semantics to last byte 2023-03-28 15:23:10 -07:00
cris
generic
hexagon Hexagon (linux-user/hexagon): handle breakpoints 2023-05-18 12:40:52 -07:00
hppa
i386 target/i386: emulate 64-bit ring 0 for linux-user if LM feature is set 2023-06-29 10:49:43 +02:00
include
loongarch64 target/loongarch: Add LSX data type VReg 2023-05-06 11:19:42 +08:00
m68k
microblaze
mips linux-user: Fix mips fp64 executables loading 2023-05-17 07:20:29 +02:00
mips64
nios2
openrisc
ppc ppc: spapr: cleanup cr get/set with helpers. 2023-05-05 12:34:22 -03:00
riscv
s390x linux-user/s390x: Fix single-stepping SVC 2023-06-05 07:27:23 +02:00
sh4
sparc
x86_64
xtensa
cpu_loop-common.h
elfload.c linux-user: elfload: Specify -R is an option for qemu-user binaries 2023-06-10 09:40:46 +03:00
errnos.c.inc
exit.c *: Add missing includes of qemu/plugin.h 2023-03-22 15:06:57 +00:00
fd-trans.c
fd-trans.h
flat.h
flatload.c linux-user: Pass last not end to probe_guest_base 2023-03-28 15:23:10 -07:00
ioctls.h
linux_loop.h
linuxload.c
loader.h linux-user/elfload: Introduce elf_hwcap_str() on s390x 2023-06-05 20:48:34 +02:00
main.c linux-user, bsd-user: Preserve incoming order of environment variables in the target 2023-06-13 11:28:53 +02:00
meson.build
mmap.c linux-user: Avoid mmap of the last byte of the reserved_va 2023-07-01 08:33:08 +02:00
qemu.h linux-user: Add new flag VERIFY_NONE 2023-05-17 07:20:29 +02:00
semihost.c
signal-common.h
signal.c
socket.h
strace.c
strace.h
strace.list
syscall_defs.h linux-user/sparc: Don't use 16-bit UIDs on SPARC V9 2023-03-30 15:03:23 +02:00
syscall_types.h
syscall.c linux-user: Return EINVAL for getgroups() with negative gidsetsize 2023-06-10 00:00:24 +03:00
thunk.c
trace-events
trace.h
uaccess.c
uname.c
uname.h
user-internals.h linux-user: Pass last not end to probe_guest_base 2023-03-28 15:23:10 -07:00
user-mmap.h
vm86.c