qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Riku Voipio <riku.voipio@iki.fi>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Timothy E Baldwin <T.E.Baldwin99@members.leeds.ac.uk>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 00/34] linux-user: Fix signal race conditions and SA_RESTART
Date: Fri, 2 Oct 2015 14:52:44 +0300	[thread overview]
Message-ID: <20151002115244.GB15723@kos.to> (raw)
In-Reply-To: <CAFEAcA8bjhBJ9SNOzXtgEKiUCrYx5oXAxSV4cwu9xNgj1K7Ycg@mail.gmail.com>

Hi Timothy,

On Thu, Sep 10, 2015 at 07:00:18PM +0100, Peter Maydell wrote:
> On 6 September 2015 at 00:56, Timothy E Baldwin
> <T.E.Baldwin99@members.leeds.ac.uk> wrote:
> > There are many races with signals in linux user:
> >
> >  - Multiple host signals in quick succession, fixed by keeping host signals
> >    blocked, and checking if target signals are blocked before calling
> >    target signal handler.
> >  - Signal shortly before blocking system call, fixed by either:
> >    - Block hosts signals, check and use host system call with
> >      sigset_t parameter.
> >    - Or check if signals are pending immediately before host system call
> >      and if a signal arrives between the check and system call rewind
> >      host instruction pointer to before the check. Also fixes SA_RESTART.
> >  - Signal before or during sensitive system call, fixed in a similar manner.
> >  - Close host and synchronous signals, partly fixed by implementing a separate
> >    queue for synchronous signals which are dispatched first. The asynchronous
> >    signal may still be delayed or lost rather than dispatched to another thread
> >    or handled after exec().
> >
> > Also fixed:
> >  - Errno array bounds.
> >  - Default fatal actions occurring in the middle of target instructions.
> 
> Thanks for sending this patchset. This is really cool and we've needed
> it for a long time...

Indeed, this would be nice to have for Qemu 2.5. Do you have time to
work through Peters comments and send an updated round of patches?

Riku

      reply	other threads:[~2015-10-02 11:52 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-05 23:56 [Qemu-devel] [PATCH 00/34] linux-user: Fix signal race conditions and SA_RESTART Timothy E Baldwin
2015-09-05 23:56 ` [Qemu-devel] [PATCH 01/34] linux-user: Fix array bounds in errno conversion Timothy E Baldwin
2015-09-10 18:04   ` Peter Maydell
2015-09-11 10:59   ` Peter Maydell
2015-10-12 13:42     ` Riku Voipio
2015-10-31  2:51       ` Laurent Vivier
2015-09-05 23:56 ` [Qemu-devel] [PATCH 02/34] linux-user: Reindent signal handling Timothy E Baldwin
2015-09-05 23:56 ` [Qemu-devel] [PATCH 03/34] linux-user: Support for restarting system calls Timothy E Baldwin
2015-09-10 18:08   ` Peter Maydell
2015-09-05 23:56 ` [Qemu-devel] [PATCH 04/34] linux-user: Support for restarting system calls for x86 targets Timothy E Baldwin
2015-09-10 18:08   ` Peter Maydell
2015-09-05 23:56 ` [Qemu-devel] [PATCH 05/34] linux-user: Support for restarting system calls for ARM targets Timothy E Baldwin
2015-09-10 18:09   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 06/34] linux-user: Support for restarting system calls for MIPS targets Timothy E Baldwin
2015-09-10 18:09   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 07/34] linux-user: Support for restarting system calls for PPC targets Timothy E Baldwin
2015-09-10 18:10   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 08/34] linux-user: Support for restarting system calls for SPARC targets Timothy E Baldwin
2015-09-10 18:10   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 09/34] linux-user: Test for restarting system calls Timothy E Baldwin
2015-09-10 18:12   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 10/34] linux-user: Support for restarting system calls for Microblaze targets Timothy E Baldwin
2015-09-10 18:14   ` Peter Maydell
2016-03-03 20:15     ` Peter Maydell
2016-03-04  0:27       ` Edgar E. Iglesias
2016-03-04 10:11         ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 11/34] linux-user: Support for restarting system calls for SH4 targets Timothy E Baldwin
2015-09-10 18:15   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 12/34] linux-user: Support for restarting system calls for APLHA targets Timothy E Baldwin
2015-09-10 18:16   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 13/34] linux-user: Fix signal before blocking system calls race and SA_RESTART Timothy E Baldwin
2015-09-10 18:46   ` Peter Maydell
2015-09-11 10:57   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 14/34] linux-user: Use safe_syscall for read and write system calls Timothy E Baldwin
2015-09-10 18:48   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 15/34] linux-user: Remove redundant get_errno() calls Timothy E Baldwin
2015-09-10 18:50   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 16/34] linux-user: Use safe_syscall for open and openat system calls Timothy E Baldwin
2015-09-10 18:54   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 17/34] linux-user: Use safe_syscall for wait " Timothy E Baldwin
2015-09-10 18:58   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 18/34] linux-user: Fix race between multiple signals Timothy E Baldwin
2015-09-11 14:30   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 19/34] linux-user: Restart fork() if signals pending Timothy E Baldwin
2015-09-11 14:34   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 20/34] linux-user: Remove redundant default action check in queue_signal() Timothy E Baldwin
2015-09-11 14:41   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 21/34] linux-user: Remove redundant gdb_queuesig() Timothy E Baldwin
2015-09-05 23:57 ` [Qemu-devel] [PATCH 22/34] linux-user: Remove real-time signal queuing Timothy E Baldwin
2015-09-05 23:57 ` [Qemu-devel] [PATCH 23/34] linux-user: Queue synchronous signals separately Timothy E Baldwin
2015-09-05 23:57 ` [Qemu-devel] [PATCH 24/34] linux-user: Restart execve() if signal pending Timothy E Baldwin
2015-09-11 14:36   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 25/34] linux-user: Restart exit() " Timothy E Baldwin
2015-09-11 14:36   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 26/34] linux-user: Restart kill() " Timothy E Baldwin
2015-09-05 23:57 ` [Qemu-devel] [PATCH 27/34] linux-user: pause() should not pause " Timothy E Baldwin
2015-09-11 14:36   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 28/34] linux-user: Restart sigaction() " Timothy E Baldwin
2015-09-11 14:37   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 29/34] linux-user: Support for restarting system calls for UniCore32 targets Timothy E Baldwin
2015-09-10 19:05   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 30/34] linux-user: Support for restarting system calls for OpenRISC targets Timothy E Baldwin
2015-09-10 19:06   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 31/34] linux-user: Support for restarting system calls for M68K targets Timothy E Baldwin
2015-09-10 19:06   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 32/34] linux-user: Support for restarting system calls for S390 targets Timothy E Baldwin
2015-09-10 19:07   ` Peter Maydell
2015-09-05 23:57 ` [Qemu-devel] [PATCH 33/34] linux-user: Support for restarting system calls for CRIS targets Timothy E Baldwin
2015-09-10 19:12   ` Peter Maydell
2015-09-11 14:18     ` Edgar E. Iglesias
2015-09-11 14:20       ` Peter Maydell
2015-09-11 14:26         ` Edgar E. Iglesias
2015-09-05 23:57 ` [Qemu-devel] [PATCH 34/34] linux-user: Remove TARGET_USE_ERESTARTSYS Timothy E Baldwin
2015-09-10 19:13   ` Peter Maydell
2015-09-10 18:00 ` [Qemu-devel] [PATCH 00/34] linux-user: Fix signal race conditions and SA_RESTART Peter Maydell
2015-10-02 11:52   ` Riku Voipio [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151002115244.GB15723@kos.to \
    --to=riku.voipio@iki.fi \
    --cc=T.E.Baldwin99@members.leeds.ac.uk \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).