All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Jincheng Miao <jmiao@redhat.com>, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, riku.voipio@iki.fi
Subject: Re: [Qemu-devel] [PATCH] linux-user: Fix syscall instruction usermode emulation on X86_64
Date: Fri, 08 Aug 2014 07:09:25 -1000	[thread overview]
Message-ID: <53E50445.7000405@twiddle.net> (raw)
In-Reply-To: <1407470214-10792-1-git-send-email-jmiao@redhat.com>

On 08/07/2014 05:56 PM, Jincheng Miao wrote:
> Currently syscall instruction is buggy on user mode X86_64,
> the EIP is updated after do_syscall(), that is too late for
> clone(). Because clone() will create a thread at the env->EIP
> (the address of syscall insn), and then child thread enters
> do_syscall() again, that is not expected. Sometimes it is tragic.
> 
> User mode syscall insn emulation is not used MSR, so the
> action should be same to INT 0x80. INT 0x80 will update EIP in
> do_interrupt(), ditto for syscall() for consistency.
> 
> Signed-off-by: Jincheng Miao <jmiao@redhat.com>
> ---
>  linux-user/main.c        |    1 -
>  target-i386/seg_helper.c |    4 ++--
>  2 files changed, 2 insertions(+), 3 deletions(-)

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~

  reply	other threads:[~2014-08-08 17:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08  3:56 [Qemu-devel] [PATCH] linux-user: Fix syscall instruction usermode emulation on X86_64 Jincheng Miao
2014-08-08 17:09 ` Richard Henderson [this message]
2014-08-12  7:22 ` Riku Voipio

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=53E50445.7000405@twiddle.net \
    --to=rth@twiddle.net \
    --cc=jmiao@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.