aboutsummaryrefslogtreecommitdiff
path: root/cpu-exec-common.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-07-28 16:44:49 +0100
committerRiku Voipio <riku.voipio@linaro.org>2016-09-21 22:01:45 +0300
commitc599d4d6d6e9bfdb64e54c33a22cb26e3496b96d (patch)
tree4f5db178fbb692ad5d8a3819476d0f3c57b51d5a /cpu-exec-common.c
parent28298c912e2c379f2b7767b351beeb77f001f27f (diff)
linux-user: SIGSEGV from sigreturn need not be fatal
If the sigreturn syscall fails to read memory then this causes a SIGSEGV, but this is not necessarily a fatal signal -- the guest process can catch it. We don't implement this correctly because the behaviour of QEMU's force_sig() function has drifted away from the kernel function of the same name -- ours now does "always do a guest core dump and abort execution", whereas the kernel version simply forces the guest to take a signal, which may or may not eventually cause a core dump. Rename our force_sig() to dump_core_and_abort(), and provide a force_sig() which acts more like the kernel version as the sigreturn implementations expect it to. Since force_sig() now returns, we must update all the callsites to return -TARGET_QEMU_ESIGRETURN so that the main loop doesn't change the guest registers before the signal handler is invoked. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'cpu-exec-common.c')
0 files changed, 0 insertions, 0 deletions