qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/1] m68k linux user-space emulation fix (with sign-off this time)
@ 2015-12-09 20:54 Michael Karcher
  2015-12-09 20:54 ` [Qemu-devel] [PATCH 1/1] Fix do_rt_sigreturn on m68k linux userspace emulation Michael Karcher
  2015-12-09 21:26 ` [Qemu-devel] [PATCH 0/1] m68k linux user-space emulation fix (with sign-off this time) John Paul Adrian Glaubitz
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Karcher @ 2015-12-09 20:54 UTC (permalink / raw)
  To: Riku Voipio, Laurent Vivier, qemu-devel; +Cc: glaubitz

This patch fixes cmake blocking on m68k when starting the second child
process. cmake relies on getting SIGCHLD to know when the child process finished,
and the uninitialised sigmask set on return of the first SIGCHLD oftentimes
blocked the second SIGCHLD.

The patch has been created against Laurent's qemu-m68k git tree, but according
to visual inspection, it should also apply to HEAD.

Michael Karcher (1):
  Fix do_rt_sigreturn on m68k linux userspace emulation

 linux-user/signal.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH 1/1] Fix do_rt_sigreturn on m68k linux userspace emulation
@ 2015-12-09 20:40 Michael Karcher
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Karcher @ 2015-12-09 20:40 UTC (permalink / raw)
  To: Riku Voipio, Laurent Vivier, qemu-devel

do_rt_sigreturn forgets to initialize the signal mask variable before
trying to use it to restore the mask, so the signal mask is undefined
after do_rt_sigreturn. This bug has been in all the time since
7181155d when do_rt_sigreturn was implemented for m68k.
---
 linux-user/signal.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/linux-user/signal.c b/linux-user/signal.c
index e03ed60..ae1014b 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -5260,11 +5260,14 @@ long do_rt_sigreturn(CPUM68KState *env)
     abi_ulong frame_addr = env->aregs[7] - 4;
     target_sigset_t target_set;
     sigset_t set;
-    int d0;
+    int d0, i;
 
     if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1))
         goto badframe;
 
+    for(i = 0; i < TARGET_NSIG_WORDS; i++) {
+        target_set.sig[i] = frame->uc.tuc_sigmask.sig[i];
+    }
     target_to_host_sigset_internal(&set, &target_set);
     do_sigprocmask(SIG_SETMASK, &set, NULL);
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-12-12 10:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-09 20:54 [Qemu-devel] [PATCH 0/1] m68k linux user-space emulation fix (with sign-off this time) Michael Karcher
2015-12-09 20:54 ` [Qemu-devel] [PATCH 1/1] Fix do_rt_sigreturn on m68k linux userspace emulation Michael Karcher
2015-12-09 22:03   ` Laurent Vivier
2015-12-12  9:55     ` Michael Karcher
2015-12-12 10:35       ` Laurent Vivier
2015-12-09 21:26 ` [Qemu-devel] [PATCH 0/1] m68k linux user-space emulation fix (with sign-off this time) John Paul Adrian Glaubitz
  -- strict thread matches above, loose matches on Subject: below --
2015-12-09 20:40 [Qemu-devel] [PATCH 1/1] Fix do_rt_sigreturn on m68k linux userspace emulation Michael Karcher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).