qemu-patch-raspberry4/linux-user
Peter Maydell a7ec0f98e3 linux-user: Don't allow guest to block SIGSEGV
Don't allow the linux-user guest to block SIGSEGV -- QEMU needs this
signal to detect accesses to pages which it has marked read-only
because it has cached translated code from them.

We implement this by making the do_sigprocmask() wrapper suppress
SIGSEGV when doing the host process signal mask manipulation; instead
we store the current state of SIGSEGV in the TaskState struct.

If we get a SIGSEGV for the guest when the guest has blocked the
signal, we treat it as if the default SEGV handler was in place,
as the kernel does for forced SIGSEGV delivery.

This patch is based on an idea by Alex Barcelo, but rather than
simply lying to the guest about the SIGSEGV state we track it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reported-by: Alex Barcelo <abarcelo@ac.upc.edu>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-03-17 11:44:32 +02:00
..
aarch64 linux-user: AArch64: define TARGET_CLONE_BACKWARDS 2014-01-08 19:07:20 +00:00
alpha linux-user: set minimum kernel version to 2.6.32 2014-03-10 13:55:00 +02:00
arm linux-user: set minimum kernel version to 2.6.32 2014-03-10 13:55:00 +02:00
cris linux-user: set minimum kernel version to 2.6.32 2014-03-10 13:55:00 +02:00
i386 linux-user: set minimum kernel version to 2.6.32 2014-03-10 13:55:00 +02:00
m68k cpu: Move opaque field from CPU_COMMON to CPUState 2014-03-13 19:20:47 +01:00
microblaze linux-user: set minimum kernel version to 2.6.32 2014-03-10 13:55:00 +02:00
mips linux-user: set minimum kernel version to 2.6.32 2014-03-10 13:55:00 +02:00
mips64 linux-user: set minimum kernel version to 2.6.32 2014-03-10 13:55:00 +02:00
openrisc linux-user: set minimum kernel version to 2.6.32 2014-03-10 13:55:00 +02:00
ppc linux-user: set minimum kernel version to 2.6.32 2014-03-10 13:55:00 +02:00
s390x linux-user: set minimum kernel version to 2.6.32 2014-03-10 13:55:00 +02:00
sh4 linux-user: set minimum kernel version to 2.6.32 2014-03-10 13:55:00 +02:00
sparc linux-user: set minimum kernel version to 2.6.32 2014-03-10 13:55:00 +02:00
sparc64 linux-user: set minimum kernel version to 2.6.32 2014-03-10 13:55:00 +02:00
unicore32 linux-user: set minimum kernel version to 2.6.32 2014-03-10 13:55:00 +02:00
x86_64 linux-user: set minimum kernel version to 2.6.32 2014-03-10 13:55:00 +02:00
cpu-uname.c linux-user: Don't treat AArch64 cpu names specially 2013-09-10 19:11:28 +01:00
cpu-uname.h linux-user: adapt uname machine to emulated CPU 2010-02-06 17:19:43 +01:00
elfload.c linux-user: Don't reserve space for commpage for AArch64 2014-03-17 11:44:31 +02:00
errno_defs.h Remove unnecessary trailing newlines 2008-12-13 09:32:43 +00:00
flat.h Support for 32 bit ABI on 64 bit targets (only enabled Sparc64) 2007-10-14 16:27:31 +00:00
flatload.c linux-user: Remove regs parameter of load_elf_binary and load_flt_binary 2014-01-10 08:51:37 +02:00
ioctls.h linux-user: Implement BLKPG ioctl 2014-02-19 12:29:23 +02:00
linux_loop.h Fix build failure with old kernel headers (loop.h is incompatible with 2008-05-23 16:06:43 +00:00
linuxload.c cpu: Move opaque field from CPU_COMMON to CPUState 2014-03-13 19:20:47 +01:00
m68k-sim.c exec: Change cpu_abort() argument to CPUState 2014-03-13 19:52:28 +01:00
main.c exec: Change cpu_abort() argument to CPUState 2014-03-13 19:52:28 +01:00
Makefile.objs build: move *-user/ objects to nested Makefile.objs 2012-06-07 07:17:33 +02:00
mmap.c configure: Make NPTL non-optional 2013-07-22 21:54:52 +03:00
qemu.h linux-user: Don't allow guest to block SIGSEGV 2014-03-17 11:44:32 +02:00
signal.c linux-user: Don't allow guest to block SIGSEGV 2014-03-17 11:44:32 +02:00
socket.h linux-user: improve target_to_host_sock_type conversion 2013-07-05 15:45:40 +03:00
strace.c linux-user: Don't omit comma for strace of rt_sigaction() 2013-04-05 14:40:54 +02:00
strace.list [v2] linux-user: implement m68k atomic syscalls 2013-09-24 10:47:07 +03:00
syscall.c signal: added a wrapper for sigprocmask function 2014-03-17 11:44:32 +02:00
syscall_defs.h linux-user: implement F_[GS]ETOWN_EX 2014-03-17 11:44:31 +02:00
syscall_types.h linux-user: Implement BLKPG ioctl 2014-02-19 12:29:23 +02:00
target_flat.h linux-user/FLAT: allow targets to override FLAT processing 2011-02-09 10:33:54 +02:00
uaccess.c Fix missing strnlen problems 2009-07-01 18:24:44 +00:00
vm86.c cpu: Move opaque field from CPU_COMMON to CPUState 2014-03-13 19:20:47 +01:00