qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Riku Voipio <riku.voipio@iki.fi>
To: Richard Henderson <rth@twiddle.net>
Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH 1/6] linux-user: fix x86_64 safe_syscall
Date: Tue, 21 Jun 2016 22:26:57 +0300	[thread overview]
Message-ID: <20160621192657.GC21172@beaming.home> (raw)
In-Reply-To: <1465854326-19160-2-git-send-email-rth@twiddle.net>

On Mon, Jun 13, 2016 at 02:45:21PM -0700, 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.

Applied to linux-user with the type fixed,
Thanks

> Signed-off-by: Richard Henderson <rth@twiddle.net>
> ---
>  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
> -- 
> 2.5.5
> 

  parent reply	other threads:[~2016-06-21 19:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-13 21:45 [Qemu-devel] [PATCH 0/6] linux-user: safe_syscall updates Richard Henderson
2016-06-13 21:45 ` [Qemu-devel] [PATCH 1/6] linux-user: fix x86_64 safe_syscall Richard Henderson
2016-06-14 11:58   ` Peter Maydell
2016-06-21 19:26   ` Riku Voipio [this message]
2016-06-13 21:45 ` [Qemu-devel] [PATCH 2/6] linux-user: Provide safe_syscall for i386 Richard Henderson
2016-06-14 11:58   ` Peter Maydell
2016-06-14 15:47     ` Richard Henderson
2016-06-13 21:45 ` [Qemu-devel] [PATCH 3/6] linux-user: Provide safe_syscall for arm Richard Henderson
2016-06-14 12:04   ` Peter Maydell
2016-06-14 15:53     ` Richard Henderson
2016-06-13 21:45 ` [Qemu-devel] [PATCH 4/6] linux-user: Provide safe_syscall for aarch64 Richard Henderson
2016-06-13 22:04   ` Peter Maydell
2016-06-13 22:21     ` Richard Henderson
2016-06-13 22:28       ` Peter Maydell
2016-06-13 22:31         ` Peter Maydell
2016-06-13 22:38         ` Richard Henderson
2016-06-13 22:40           ` Peter Maydell
2016-06-13 21:45 ` [Qemu-devel] [PATCH 5/6] linux-user: Provide safe_syscall for s390x Richard Henderson
2016-06-13 21:45 ` [Qemu-devel] [PATCH 6/6] linux-user: Provide safe_syscall for ppc64 Richard Henderson
2016-06-13 22:23   ` Peter Maydell
2016-06-13 21:53 ` [Qemu-devel] [PATCH 0/6] linux-user: safe_syscall updates Peter Maydell
2016-06-13 22:09   ` Peter Maydell
2016-06-21 19:08     ` Riku Voipio
2016-06-21 19:49       ` Peter Maydell

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=20160621192657.GC21172@beaming.home \
    --to=riku.voipio@iki.fi \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).