From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmme0-0005Zt-6v for qemu-devel@nongnu.org; Wed, 21 Sep 2016 14:53:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmmdw-000515-2L for qemu-devel@nongnu.org; Wed, 21 Sep 2016 14:53:19 -0400 Received: from jessie.kos.to ([212.47.231.226]:43622 helo=pilvi.kos.to) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmmdv-0004zO-Sj for qemu-devel@nongnu.org; Wed, 21 Sep 2016 14:53:15 -0400 Date: Wed, 21 Sep 2016 18:53:08 +0000 From: Riku Voipio Message-ID: <20160921185308.GB24113@kos.to> References: <1469720690-32060-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1469720690-32060-1-git-send-email-peter.maydell@linaro.org> Subject: Re: [Qemu-devel] [PATCH 0/6] linux-user: Handle SEGV on signal entry/exit correctly List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, patches@linaro.org On Thu, Jul 28, 2016 at 04:44:44PM +0100, Peter Maydell wrote: > This patchset fixes bugs in our handling of failure to read > or write guest memory on entry and exit from a signal handler. > This is supposed to cause a SIGSEGV, but the guest is permitted > a chance to handle the SIGSEGV (assuming it wasn't generated > in the course of trying to enter a SIGSEGV handler in the first > place). Our current implementation makes the SIGSEGV always > fatal, regardless of whether the guest had a signal handler > set up for it. > > The main cause of this bug is that our implementation of > force_sig() had drifted away from the semantics of the kernel > function of that name, so the series renames that to > dump_core_and_abort(), and provides a force_sig() that just > queues a synchronous signal to be taken in the usual way. > > The patchset sits on top of my various other pending linux-user > fixes. There are getting to be quite a lot of those now, so > you can find them and this patchset at: > > https://git.linaro.org/people/peter.maydell/qemu-arm.git linux-fixes > > The test program I used is at > http://people.linaro.org/~peter.maydell/sigaltstack.c > (NB: contains a magic constant that will need tweaking for > non-x86 guests); it arranges to take a SIGSEGV while trying to > take a SIGUSR1. > > Although this is a bugfix, it's for a fairly obscure corner > case, so we might want to defer this to 2.8. Applied to linux-user que, thanks! > thanks > -- PMM > > Peter Maydell (6): > linux-user: Recheck for pending synchronous signals too > linux-user: Pass si_type information to queue_signal() explicitly > linux-user: SIGSEGV on signal entry need not be fatal > linux-user: ARM: Give SIGSEGV if signal frame setup fails > linux-user: SIGSEGV from sigreturn need not be fatal > linux-user: Implement force_sigsegv() via force_sig() > > linux-user/main.c | 124 ++++++++++++++++----------------- > linux-user/qemu.h | 3 +- > linux-user/signal.c | 189 ++++++++++++++++++++++++++++++--------------------- > linux-user/syscall.c | 6 +- > 4 files changed, 180 insertions(+), 142 deletions(-) > > -- > 1.9.1 >