syzbot


WARNING in clear_dirty_gfn_range

Status: fixed on 2024/05/22 23:08
Subsystems: kvm
[Documentation on labels]
Reported-by: syzbot+900d58a45dcaab9e4821@syzkaller.appspotmail.com
Fix commit: 2673dfb591a3 KVM: x86/mmu: Write-protect L2 SPTEs in TDP MMU when clearing dirty status
First crash: 134d, last: 113d
Discussions (3)
Title Replies (including bot) Last reply
[PATCH 1/4] KVM: x86/mmu: Check kvm_mmu_page_ad_need_write_protect() when clearing TDP MMU dirty bits 2 (2) 2024/04/09 23:13
[syzbot] Monthly kvm report (Apr 2024) 0 (1) 2024/04/05 12:45
[syzbot] [kvm?] WARNING in clear_dirty_gfn_range 3 (4) 2024/03/15 19:06
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/04/03 14:19 14m retest repro upstream report log

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 5165 at arch/x86/kvm/mmu/tdp_mmu.c:1526 clear_dirty_gfn_range+0x3d6/0x540 arch/x86/kvm/mmu/tdp_mmu.c:1526
Modules linked in:
CPU: 1 PID: 5165 Comm: syz-executor417 Not tainted 6.8.0-syzkaller-01185-g855684c7d938 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
RIP: 0010:clear_dirty_gfn_range+0x3d6/0x540 arch/x86/kvm/mmu/tdp_mmu.c:1526
Code: 00 31 ff 48 b8 00 00 00 00 00 00 30 00 48 21 d8 49 89 c5 48 89 c6 e8 e9 9c 6c 00 4d 85 ed 0f 84 b8 fe ff ff e8 cb a1 6c 00 90 <0f> 0b 90 e9 aa fe ff ff e8 bd a1 6c 00 e8 a8 39 53 00 31 ff 89 c6
RSP: 0018:ffffc900039a7570 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 06200000310acb77 RCX: ffffffff81204937
RDX: ffff888022a8c880 RSI: ffffffff81204945 RDI: 0000000000000007
RBP: 0000000000000001 R08: 0000000000000007 R09: 0000000000000000
R10: 0020000000000000 R11: 0000000000000002 R12: ffffc900039a75c8
R13: 0020000000000000 R14: 0000000000000200 R15: 0000000000000001
FS:  000055556ed44380(0000) GS:ffff88806b300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000027762000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 kvm_tdp_mmu_clear_dirty_slot+0x24f/0x2e0 arch/x86/kvm/mmu/tdp_mmu.c:1557
 kvm_mmu_slot_leaf_clear_dirty+0x38b/0x490 arch/x86/kvm/mmu/mmu.c:6783
 kvm_mmu_slot_apply_flags arch/x86/kvm/x86.c:12962 [inline]
 kvm_arch_commit_memory_region+0x299/0x490 arch/x86/kvm/x86.c:13031
 kvm_commit_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1751 [inline]
 kvm_set_memslot+0x4d3/0x13e0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1994
 __kvm_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:2129 [inline]
 __kvm_set_memory_region+0xdbc/0x1520 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2020
 kvm_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:2150 [inline]
 kvm_vm_ioctl_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:2162 [inline]
 kvm_vm_ioctl+0x151c/0x3e20 arch/x86/kvm/../../../virt/kvm/kvm_main.c:5152
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:904 [inline]
 __se_sys_ioctl fs/ioctl.c:890 [inline]
 __x64_sys_ioctl+0x193/0x220 fs/ioctl.c:890
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xd2/0x260 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x6d/0x75
RIP: 0033:0x7f4e1b1860f9
Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffdd21061f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffdd21063c8 RCX: 00007f4e1b1860f9
RDX: 0000000020000180 RSI: 000000004020ae46 RDI: 0000000000000004
RBP: 00007f4e1b1f9610 R08: 00007ffdd21063c8 R09: 00007ffdd21063c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffdd21063b8 R14: 0000000000000001 R15: 0000000000000001
 </TASK>

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/12 23:02 upstream 855684c7d938 c35c26ec .config console log report syz C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in clear_dirty_gfn_range
2024/03/20 14:11 upstream a4145ce1e7bc 5b7d42ae .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in clear_dirty_gfn_range
2024/03/12 22:46 upstream 855684c7d938 c35c26ec .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in clear_dirty_gfn_range
* Struck through repros no longer work on HEAD.