qemu-e2k/linux-user
Peter Maydell b6e17875f2 linux-user: Don't assert if guest tries shmdt(0)
Our implementation of shmat() and shmdt() for linux-user was
using "zero guest address" as its marker for "entry in the
shm_regions[] array is not in use". This meant that if the
guest did a shmdt(0) we would match on an unused array entry
and call page_set_flags() with both start and end addresses zero,
which causes an assertion failure.

Use an explicit in_use flag to manage the shm_regions[] array,
so that we avoid this problem.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reported-by: Pavel Shamis <pasharesearch@gmail.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2016-02-23 21:25:09 +02:00
..
aarch64 build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-23 21:25:09 +02:00
alpha build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-23 21:25:09 +02:00
arm build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-23 21:25:09 +02:00
cris build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-23 21:25:09 +02:00
i386 build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-23 21:25:09 +02:00
m68k build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-23 21:25:09 +02:00
microblaze build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-23 21:25:09 +02:00
mips build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-23 21:25:09 +02:00
mips64 build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-23 21:25:09 +02:00
openrisc build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-23 21:25:09 +02:00
ppc build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-23 21:25:09 +02:00
s390x build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-23 21:25:09 +02:00
sh4 build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-23 21:25:09 +02:00
sparc build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-23 21:25:09 +02:00
sparc64 build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-23 21:25:09 +02:00
tilegx build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-23 21:25:09 +02:00
unicore32 build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-23 21:25:09 +02:00
x86_64 build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-23 21:25:09 +02:00
elfload.c linux-user: Clean up includes 2016-01-29 15:07:22 +00:00
errno_defs.h
flat.h
flatload.c linux-user: Clean up includes 2016-01-29 15:07:22 +00:00
ioctls.h
linux_loop.h
linuxload.c linux-user: Clean up includes 2016-01-29 15:07:22 +00:00
m68k-sim.c linux-user: Clean up includes 2016-01-29 15:07:22 +00:00
main.c linux-user: set ppc64/ppc64le default CPU to POWER8 2016-02-23 21:25:09 +02:00
Makefile.objs
mmap.c linux-user: Clean up includes 2016-01-29 15:07:22 +00:00
qemu.h build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-23 21:25:09 +02:00
signal.c linux-user: Clean up includes 2016-01-29 15:07:22 +00:00
socket.h
strace.c linux-user: Clean up includes 2016-01-29 15:07:22 +00:00
strace.list
syscall_defs.h linux-user: Add SOCKOP_sendmmsg and SOCKOP_recvmmsg socket call, wire them up. 2016-01-11 14:54:03 +02:00
syscall_types.h
syscall.c linux-user: Don't assert if guest tries shmdt(0) 2016-02-23 21:25:09 +02:00
target_flat.h
uaccess.c linux-user: Clean up includes 2016-01-29 15:07:22 +00:00
uname.c linux-user: Clean up includes 2016-01-29 15:07:22 +00:00
uname.h
vm86.c linux-user: Clean up includes 2016-01-29 15:07:22 +00:00