From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCmzr-0003jw-92 for qemu-devel@nongnu.org; Tue, 14 Jun 2016 07:59:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCmzq-0007CX-C5 for qemu-devel@nongnu.org; Tue, 14 Jun 2016 07:59:07 -0400 Received: from mail-vk0-x22b.google.com ([2607:f8b0:400c:c05::22b]:34779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCmzq-0007CT-7V for qemu-devel@nongnu.org; Tue, 14 Jun 2016 07:59:06 -0400 Received: by mail-vk0-x22b.google.com with SMTP id t129so89807311vka.1 for ; Tue, 14 Jun 2016 04:59:06 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1465854326-19160-2-git-send-email-rth@twiddle.net> References: <1465854326-19160-1-git-send-email-rth@twiddle.net> <1465854326-19160-2-git-send-email-rth@twiddle.net> From: Peter Maydell Date: Tue, 14 Jun 2016 12:58:46 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 1/6] linux-user: fix x86_64 safe_syscall List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: QEMU Developers , Riku Voipio On 13 June 2016 at 22:45, Richard Henderson wrote: > Do what the comment says, test for signal_pending non-zero, > rather than the current coe which tests for bit 0 non-zero. "code" > > Signed-off-by: Richard Henderson > --- > linux-user/host/x86_64/safe-syscall.inc.S | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/linux-user/host/x86_64/safe-syscall.inc.S b/linux-user/host/x86_64/safe-syscall.inc.S > index e09368d..f36992d 100644 > --- a/linux-user/host/x86_64/safe-syscall.inc.S > +++ b/linux-user/host/x86_64/safe-syscall.inc.S > @@ -67,8 +67,8 @@ safe_syscall_base: > */ > safe_syscall_start: > /* if signal_pending is non-zero, don't do the call */ > - testl $1, (%rbp) > - jnz return_ERESTARTSYS > + cmpl $0, (%rbp) > + jnz 1f > syscall > safe_syscall_end: > /* code path for having successfully executed the syscall */ > @@ -78,7 +78,7 @@ safe_syscall_end: > .cfi_restore rbp > ret > > -return_ERESTARTSYS: > +1: > /* code path when we didn't execute the syscall */ > .cfi_restore_state > mov $-TARGET_ERESTARTSYS, %rax Reviewed-by: Peter Maydell thanks -- PMM