Re: kvm: WARNING in em_ret_far
From: Paolo Bonzini
Date: Sun Nov 13 2016 - 11:15:02 EST
Reproduced.
Paolo
On 12/11/2016 22:31, Dmitry Vyukov wrote:
> Hello,
>
> The following program triggers WARNING in em_ret_far:
> https://gist.githubusercontent.com/dvyukov/12bc06a5f638d91953f94bcbe49bcc89/raw/6d863470808a695c085620664b7134864b2eb2a9/gistfile1.txt
>
> On commit 015ed9433be2b476ec7e2e6a9a411a56e3b5b035 (Nov 11).
>
> WARNING: CPU: 2 PID: 3668 at arch/x86/kvm/emulate.c:2217 em_ret_far+0x428/0x480
> Kernel panic - not syncing: panic_on_warn set ...
>
> CPU: 2 PID: 3668 Comm: syz-executor Not tainted 4.9.0-rc4+ #49
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
> ffff88006b32f618 ffffffff81c2e46b ffffffff83270ec0 ffff88006b32f6f0
> ffffffff83225600 ffffffff8110a218 ffff88006b32f6e0 ffffffff81546463
> 0000000041b58ab3 ffffffff837cda55 ffffffff815462ac ffffffff815470e9
> Call Trace:
> [< inline >] __dump_stack lib/dump_stack.c:15
> [<ffffffff81c2e46b>] dump_stack+0xb3/0x118 lib/dump_stack.c:51
> [<ffffffff81546463>] panic+0x1b7/0x3a3 kernel/panic.c:179
> [<ffffffff8123e014>] __warn+0x1c4/0x1e0 kernel/panic.c:542
> [<ffffffff8123e1fc>] warn_slowpath_null+0x2c/0x40 kernel/panic.c:585
> [<ffffffff8110a218>] em_ret_far+0x428/0x480 arch/x86/kvm/emulate.c:2217
> [<ffffffff8110a287>] em_ret_far_imm+0x17/0x70 arch/x86/kvm/emulate.c:2227
> [<ffffffff81111baa>] x86_emulate_insn+0x87a/0x3730 arch/x86/kvm/emulate.c:5294
> [<ffffffff810ad160>] x86_emulate_instruction+0x520/0x1ba0
> arch/x86/kvm/x86.c:5545
> [< inline >] emulate_instruction arch/x86/include/asm/kvm_host.h:1116
> [< inline >] complete_emulated_io arch/x86/kvm/x86.c:6870
> [<ffffffff810aecc9>] complete_emulated_mmio+0x4e9/0x710 arch/x86/kvm/x86.c:6934
> [<ffffffff810bbffa>] kvm_arch_vcpu_ioctl_run+0x3b7a/0x5a90
> arch/x86/kvm/x86.c:6978
> [<ffffffff81060cee>] kvm_vcpu_ioctl+0x61e/0xdd0
> arch/x86/kvm/../../../virt/kvm/kvm_main.c:2557
> [< inline >] vfs_ioctl fs/ioctl.c:43
> [<ffffffff816b03cc>] do_vfs_ioctl+0x18c/0x1040 fs/ioctl.c:679
> [< inline >] SYSC_ioctl fs/ioctl.c:694
> [<ffffffff816b130f>] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:685
> [<ffffffff831f0dc1>] entry_SYSCALL_64_fastpath+0x1f/0xc2
> Dumping ftrace buffer:
> (ftrace buffer empty)
> Kernel Offset: disabled
> reboot: cpu_has_vmx: ecx=80a02021 1
>