* kvm: WARNING in nested_vmx_merge_msr_bitmap
@ 2017-02-28 19:06 Dmitry Vyukov
2017-02-28 21:07 ` Jim Mattson
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Vyukov @ 2017-02-28 19:06 UTC (permalink / raw)
To: Paolo Bonzini, Radim Krčmář,
KVM list, LKML, Jim Mattson, Steve Rutherford, Xiao Guangrong,
haozhong.zhang
Cc: syzkaller
Hello,
I've got the following WARNING while running syzkaller fuzzer:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 7832 at arch/x86/kvm/vmx.c:9709
nested_vmx_merge_msr_bitmap arch/x86/kvm/vmx.c:9709 [inline]
WARNING: CPU: 0 PID: 7832 at arch/x86/kvm/vmx.c:9709
nested_get_vmcs12_pages+0xfb6/0x15c0 arch/x86/kvm/vmx.c:9640
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 7832 Comm: syz-executor1 Not tainted 4.10.0+ #229
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:15 [inline]
dump_stack+0x2ee/0x3ef lib/dump_stack.c:51
panic+0x1fb/0x412 kernel/panic.c:179
__warn+0x1c4/0x1e0 kernel/panic.c:540
warn_slowpath_null+0x2c/0x40 kernel/panic.c:583
nested_vmx_merge_msr_bitmap arch/x86/kvm/vmx.c:9709 [inline]
nested_get_vmcs12_pages+0xfb6/0x15c0 arch/x86/kvm/vmx.c:9640
enter_vmx_non_root_mode arch/x86/kvm/vmx.c:10471 [inline]
nested_vmx_run+0x6186/0xaab0 arch/x86/kvm/vmx.c:10561
handle_vmlaunch+0x1a/0x20 arch/x86/kvm/vmx.c:7312
vmx_handle_exit+0xfc0/0x3f00 arch/x86/kvm/vmx.c:8526
vcpu_enter_guest arch/x86/kvm/x86.c:6982 [inline]
vcpu_run arch/x86/kvm/x86.c:7044 [inline]
kvm_arch_vcpu_ioctl_run+0x1418/0x4840 arch/x86/kvm/x86.c:7205
kvm_vcpu_ioctl+0x673/0x1120 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2570
sctp: [Deprecated]: syz-executor2 (pid 7865) Use of int in max_burst
socket option.
Use struct sctp_assoc_value instead
vfs_ioctl fs/ioctl.c:43 [inline]
do_vfs_ioctl+0x1bf/0x1790 fs/ioctl.c:683
SYSC_ioctl fs/ioctl.c:698 [inline]
SyS_ioctl+0x8f/0xc0 fs/ioctl.c:689
entry_SYSCALL_64_fastpath+0x1f/0xc2
9pnet_virtio: no channels available for device ./bus
RIP: 0033:0x4458d9
RSP: 002b:00007f248b1abb58 EFLAGS: 00000286 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000000001b RCX: 00000000004458d9
RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 000000000000001b
RBP: 00000000006dfcd0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000286 R12: 00000000007080a8
R13: 000000000000001a R14: 000000000000001b R15: 00000000201b3000
If I am reading this correctly, failure to map msr bitmap is trivially
trigger-able by guest (specify an invalid address?) and thus should
not be a warning. The case is already handled by disabling
acceleration. So can we remove the warning? or replace with pr_err?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: kvm: WARNING in nested_vmx_merge_msr_bitmap
2017-02-28 19:06 kvm: WARNING in nested_vmx_merge_msr_bitmap Dmitry Vyukov
@ 2017-02-28 21:07 ` Jim Mattson
2017-03-01 19:08 ` Radim Krčmář
0 siblings, 1 reply; 3+ messages in thread
From: Jim Mattson @ 2017-02-28 21:07 UTC (permalink / raw)
To: Dmitry Vyukov
Cc: Paolo Bonzini, Radim Krčmář,
KVM list, LKML, Steve Rutherford, Xiao Guangrong, haozhong.zhang,
syzkaller
I believe this happens when the VMCS12 MSR bitmap address is valid,
but no device is configured to respond to the bus request. I agree
that the warning should be removed. However, in this case, the VMCS12
MSR bitmap should read as all 1s. The same is true everywhere that
nested_get_page returns NULL. Reads should return all 1s and writes
should be ignored.
On Tue, Feb 28, 2017 at 11:06 AM, Dmitry Vyukov <dvyukov@google.com> wrote:
> Hello,
>
> I've got the following WARNING while running syzkaller fuzzer:
>
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 7832 at arch/x86/kvm/vmx.c:9709
> nested_vmx_merge_msr_bitmap arch/x86/kvm/vmx.c:9709 [inline]
> WARNING: CPU: 0 PID: 7832 at arch/x86/kvm/vmx.c:9709
> nested_get_vmcs12_pages+0xfb6/0x15c0 arch/x86/kvm/vmx.c:9640
> Kernel panic - not syncing: panic_on_warn set ...
> CPU: 0 PID: 7832 Comm: syz-executor1 Not tainted 4.10.0+ #229
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
> Call Trace:
> __dump_stack lib/dump_stack.c:15 [inline]
> dump_stack+0x2ee/0x3ef lib/dump_stack.c:51
> panic+0x1fb/0x412 kernel/panic.c:179
> __warn+0x1c4/0x1e0 kernel/panic.c:540
> warn_slowpath_null+0x2c/0x40 kernel/panic.c:583
> nested_vmx_merge_msr_bitmap arch/x86/kvm/vmx.c:9709 [inline]
> nested_get_vmcs12_pages+0xfb6/0x15c0 arch/x86/kvm/vmx.c:9640
> enter_vmx_non_root_mode arch/x86/kvm/vmx.c:10471 [inline]
> nested_vmx_run+0x6186/0xaab0 arch/x86/kvm/vmx.c:10561
> handle_vmlaunch+0x1a/0x20 arch/x86/kvm/vmx.c:7312
> vmx_handle_exit+0xfc0/0x3f00 arch/x86/kvm/vmx.c:8526
> vcpu_enter_guest arch/x86/kvm/x86.c:6982 [inline]
> vcpu_run arch/x86/kvm/x86.c:7044 [inline]
> kvm_arch_vcpu_ioctl_run+0x1418/0x4840 arch/x86/kvm/x86.c:7205
> kvm_vcpu_ioctl+0x673/0x1120 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2570
> sctp: [Deprecated]: syz-executor2 (pid 7865) Use of int in max_burst
> socket option.
> Use struct sctp_assoc_value instead
> vfs_ioctl fs/ioctl.c:43 [inline]
> do_vfs_ioctl+0x1bf/0x1790 fs/ioctl.c:683
> SYSC_ioctl fs/ioctl.c:698 [inline]
> SyS_ioctl+0x8f/0xc0 fs/ioctl.c:689
> entry_SYSCALL_64_fastpath+0x1f/0xc2
> 9pnet_virtio: no channels available for device ./bus
> RIP: 0033:0x4458d9
> RSP: 002b:00007f248b1abb58 EFLAGS: 00000286 ORIG_RAX: 0000000000000010
> RAX: ffffffffffffffda RBX: 000000000000001b RCX: 00000000004458d9
> RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 000000000000001b
> RBP: 00000000006dfcd0 R08: 0000000000000000 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000286 R12: 00000000007080a8
> R13: 000000000000001a R14: 000000000000001b R15: 00000000201b3000
>
>
> If I am reading this correctly, failure to map msr bitmap is trivially
> trigger-able by guest (specify an invalid address?) and thus should
> not be a warning. The case is already handled by disabling
> acceleration. So can we remove the warning? or replace with pr_err?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: kvm: WARNING in nested_vmx_merge_msr_bitmap
2017-02-28 21:07 ` Jim Mattson
@ 2017-03-01 19:08 ` Radim Krčmář
0 siblings, 0 replies; 3+ messages in thread
From: Radim Krčmář @ 2017-03-01 19:08 UTC (permalink / raw)
To: Jim Mattson
Cc: Dmitry Vyukov, Paolo Bonzini, KVM list, LKML, Steve Rutherford,
Xiao Guangrong, haozhong.zhang, syzkaller
2017-02-28 13:07-0800, Jim Mattson:
> I believe this happens when the VMCS12 MSR bitmap address is valid,
> but no device is configured to respond to the bus request. I agree
> that the warning should be removed. However, in this case, the VMCS12
> MSR bitmap should read as all 1s. The same is true everywhere that
> nested_get_page returns NULL. Reads should return all 1s and writes
> should be ignored.
Yes, we have already checked that the address is within physical limits
and page-aligned. After that, any errors seem like undefined behavior.
Going to do a bare-metal check and send a patch, thanks.
> On Tue, Feb 28, 2017 at 11:06 AM, Dmitry Vyukov <dvyukov@google.com> wrote:
>>
>> ------------[ cut here ]------------
>> WARNING: CPU: 0 PID: 7832 at arch/x86/kvm/vmx.c:9709
>> warn_slowpath_null+0x2c/0x40 kernel/panic.c:583
>> nested_vmx_merge_msr_bitmap arch/x86/kvm/vmx.c:9709 [inline]
>> nested_get_vmcs12_pages+0xfb6/0x15c0 arch/x86/kvm/vmx.c:9640
>> enter_vmx_non_root_mode arch/x86/kvm/vmx.c:10471 [inline]
>> nested_vmx_run+0x6186/0xaab0 arch/x86/kvm/vmx.c:10561
>>
>> If I am reading this correctly, failure to map msr bitmap is trivially
>> trigger-able by guest (specify an invalid address?) and thus should
>> not be a warning. The case is already handled by disabling
>> acceleration. So can we remove the warning? or replace with pr_err?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-01 19:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-28 19:06 kvm: WARNING in nested_vmx_merge_msr_bitmap Dmitry Vyukov
2017-02-28 21:07 ` Jim Mattson
2017-03-01 19:08 ` Radim Krčmář
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.