qemu-patch-raspberry4/linux-user
Timothy E Baldwin ffdcbe223d linux-user: Use safe_syscall for execve syscall
Wrap execve() in the safe-syscall handling. Although execve() is not
an interruptible syscall, it is a special case: if we allow a signal
to happen before we make the host$ syscall then we will 'lose' it,
because at the point of execve the process leaves QEMU's control.  So
we use the safe syscall wrapper to ensure that we either take the
signal as a guest signal, or else it does not happen before the
execve completes and makes it the other program's problem.

The practical upshot is that without this SIGTERM could fail to
terminate the process.

Signed-off-by: Timothy Edward Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
Message-id: 1441497448-32489-25-git-send-email-T.E.Baldwin99@members.leeds.ac.uk
[PMM: expanded commit message to explain in more detail why this is
 needed, and add comment about it too]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2016-05-27 14:50:38 +03:00
..
aarch64 linux-user: remove unavailable syscalls from aarch64 2016-02-23 21:25:10 +02:00
alpha linux-user: Support for restarting system calls for Alpha targets 2016-05-27 14:49:50 +03:00
arm linux-user: Support for restarting system calls for ARM targets 2016-05-27 14:49:49 +03:00
cris linux-user: Support for restarting system calls for CRIS targets 2016-05-27 14:49:50 +03:00
host linux-user: Provide safe_syscall for fixing races between signals and syscalls 2016-05-27 14:49:51 +03:00
i386 linux-user: correct timerfd_create syscall numbers 2016-02-23 21:25:10 +02:00
m68k linux-user: Support for restarting system calls for M68K targets 2016-05-27 14:49:50 +03:00
microblaze linux-user: Support for restarting system calls for Microblaze targets 2016-05-27 14:49:51 +03:00
mips linux-user: Support for restarting system calls for MIPS targets 2016-05-27 14:49:49 +03:00
mips64 linux-user: Support for restarting system calls for MIPS targets 2016-05-27 14:49:49 +03:00
openrisc linux-user: Support for restarting system calls for OpenRISC targets 2016-05-27 14:49:50 +03:00
ppc linux-user: Support for restarting system calls for PPC targets 2016-05-27 14:49:49 +03:00
s390x linux-user: Support for restarting system calls for S390 targets 2016-05-27 14:49:50 +03:00
sh4 linux-user: Support for restarting system calls for SH4 targets 2016-05-27 14:49:49 +03:00
sparc linux-user: Support for restarting system calls for SPARC targets 2016-05-27 14:49:49 +03:00
sparc64 linux-user: Support for restarting system calls for SPARC targets 2016-05-27 14:49:49 +03:00
tilegx linux-user: Support for restarting system calls for tilegx targets 2016-05-27 14:49:50 +03: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 linux-user: correct timerfd_create syscall numbers 2016-02-23 21:25:10 +02:00
elfload.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
errno_defs.h linux-user: Renumber TARGET_QEMU_ESIGRETURN, make it not arch-specific 2016-05-27 14:49:49 +03: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 osdep: add wrappers for socket functions 2016-03-10 17:19:07 +00:00
ioctls.h linux-user: Convert blkpg to use a special subop handler 2014-10-06 21:52:45 +03: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 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: Support for restarting system calls for Microblaze targets 2016-05-27 14:49:51 +03:00
Makefile.objs linux-user: Provide safe_syscall for fixing races between signals and syscalls 2016-05-27 14:49:51 +03:00
mmap.c linux-user: Clean up includes 2016-01-29 15:07:22 +00:00
qemu.h linux-user: Provide safe_syscall for fixing races between signals and syscalls 2016-05-27 14:49:51 +03:00
safe-syscall.S linux-user: Provide safe_syscall for fixing races between signals and syscalls 2016-05-27 14:49:51 +03:00
signal.c linux-user: Provide safe_syscall for fixing races between signals and syscalls 2016-05-27 14:49:51 +03:00
socket.h linux-user: support SO_PASSSEC setsockopt option 2014-06-29 14:19:59 +03:00
strace.c linux-user: Clean up includes 2016-01-29 15:07:22 +00:00
strace.list linux-user: add setns and unshare 2014-08-22 15:06:34 +03:00
syscall.c linux-user: Use safe_syscall for execve syscall 2016-05-27 14:50:38 +03:00
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 linux-user: Convert blkpg to use a special subop handler 2014-10-06 21:52:45 +03:00
target_flat.h linux-user/FLAT: allow targets to override FLAT processing 2011-02-09 10:33:54 +02:00
uaccess.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
uname.c linux-user: Clean up includes 2016-01-29 15:07:22 +00:00
uname.h linux-user: move uname functions to uname.c 2014-05-02 21:59:36 +03:00
vm86.c linux-user: Clean up includes 2016-01-29 15:07:22 +00:00