From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhytN-0008OM-Gb for qemu-devel@nongnu.org; Fri, 02 Oct 2015 07:52:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZhytK-0007Pa-AE for qemu-devel@nongnu.org; Fri, 02 Oct 2015 07:52:49 -0400 Received: from jessie.kos.to ([212.47.231.226]:43023 helo=pilvi.kos.to) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhytK-0007PW-56 for qemu-devel@nongnu.org; Fri, 02 Oct 2015 07:52:46 -0400 Date: Fri, 2 Oct 2015 14:52:44 +0300 From: Riku Voipio Message-ID: <20151002115244.GB15723@kos.to> References: <1441497448-32489-1-git-send-email-T.E.Baldwin99@members.leeds.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 00/34] linux-user: Fix signal race conditions and SA_RESTART List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Timothy E Baldwin , QEMU Developers 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 > 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