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 <jm...@redhat.com> > --- > linux-user/main.c | 1 - > target-i386/seg_helper.c | 4 ++-- > 2 files changed, 2 insertions(+), 3 deletions(-)
Reviewed-by: Richard Henderson <r...@twiddle.net> r~