summaryrefslogtreecommitdiffstats
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorJincheng Miao2014-08-08 05:56:54 +0200
committerRiku Voipio2014-08-22 14:06:33 +0200
commit47575997be9e0cae44a4fcaecbd172fec3746c96 (patch)
tree4f5e143e0be83f4102e34da512d3727bcaa22be7 /linux-user/syscall.c
parentlinux-user: redirect openat calls (diff)
downloadqemu-47575997be9e0cae44a4fcaecbd172fec3746c96.tar.gz
qemu-47575997be9e0cae44a4fcaecbd172fec3746c96.tar.xz
qemu-47575997be9e0cae44a4fcaecbd172fec3746c96.zip
linux-user: Fix syscall instruction usermode emulation on X86_64
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> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user/syscall.c')
0 files changed, 0 insertions, 0 deletions