[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] linux-user: Fix syscall instruction usermode em
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH] linux-user: Fix syscall instruction usermode emulation on X86_64 |
Date: |
Fri, 08 Aug 2014 07:09:25 -1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 |
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 <address@hidden>
> ---
> linux-user/main.c | 1 -
> target-i386/seg_helper.c | 4 ++--
> 2 files changed, 2 insertions(+), 3 deletions(-)
Reviewed-by: Richard Henderson <address@hidden>
r~