diff options
| author | Peter Maydell | 2016-07-28 17:44:49 +0200 |
|---|---|---|
| committer | Riku Voipio | 2016-09-21 21:01:45 +0200 |
| commit | c599d4d6d6e9bfdb64e54c33a22cb26e3496b96d (patch) | |
| tree | 4f5db178fbb692ad5d8a3819476d0f3c57b51d5a /linux-user/syscall.c | |
| parent | linux-user: ARM: Give SIGSEGV if signal frame setup fails (diff) | |
| download | qemu-c599d4d6d6e9bfdb64e54c33a22cb26e3496b96d.tar.gz qemu-c599d4d6d6e9bfdb64e54c33a22cb26e3496b96d.tar.xz qemu-c599d4d6d6e9bfdb64e54c33a22cb26e3496b96d.zip | |
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 'linux-user/syscall.c')
0 files changed, 0 insertions, 0 deletions
