diff options
author | Timothy E Baldwin <T.E.Baldwin99@members.leeds.ac.uk> | 2016-05-27 15:51:53 +0100 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2016-06-07 16:39:07 +0300 |
commit | 655ed67c2a248cf0a887229d8492d6ddc0518545 (patch) | |
tree | 542aa631caa63e220ac88e259d03942eb694b590 /linux-user/qemu.h | |
parent | 907f5fddaa673ac3f6dc955df6eac2870e3603f4 (diff) | |
download | qemu-655ed67c2a248cf0a887229d8492d6ddc0518545.zip qemu-655ed67c2a248cf0a887229d8492d6ddc0518545.tar.gz qemu-655ed67c2a248cf0a887229d8492d6ddc0518545.tar.bz2 |
linux-user: Queue synchronous signals separately
If a synchronous signal and an asynchronous signal arrive near simultaneously,
and the signal number of the asynchronous signal is lower than that of the
synchronous signal the the handler for the asynchronous would be called first,
and then the handler for the synchronous signal would be called within or
after the first handler with an incorrect context.
This is fixed by queuing synchronous signals separately. Note that this does
risk delaying a asynchronous signal until the synchronous signal handler
returns rather than handling the signal on another thread, but this seems
unlikely to cause problems for real guest programs and is unavoidable unless
we could guarantee to roll back and reexecute whatever guest instruction
caused the synchronous signal (which would be a bit odd if we've already
logged its execution, for instance, and would require careful analysis of
all guest CPUs to check it was possible in all cases).
Signed-off-by: Timothy Edward Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
Message-id: 1441497448-32489-24-git-send-email-T.E.Baldwin99@members.leeds.ac.uk
[PMM: added a comment]
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>
Diffstat (limited to 'linux-user/qemu.h')
-rw-r--r-- | linux-user/qemu.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/linux-user/qemu.h b/linux-user/qemu.h index b201f90..6bd7b32 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -119,6 +119,7 @@ typedef struct TaskState { struct image_info *info; struct linux_binprm *bprm; + struct emulated_sigtable sync_signal; struct emulated_sigtable sigtab[TARGET_NSIG]; /* This thread's signal mask, as requested by the guest program. * The actual signal mask of this thread may differ: |