CVSROOT: /cvs Module name: src Changes by: d...@cvs.openbsd.org 2021/09/05 07:13:31
Modified files: sys/arch/amd64/amd64: vmm.c Log message: vmm(4): fix vcpu locking issues reported by syzbot Syzbot found 3 issues related to the new vcpu lock. This diff adds a write lock to vm_rwregs (needed on VMX as vmread instructions require taking ownership of the vcpu to load the VMCS) and prevents locking the vcpu in vm_run if we fail the cas operation for toggling vcpu state. In the future, we can push the locking in vm_rwregs on AMD SVM systems. The panics in question: panic: rw_enter: vcpulock locking against myself panic: lock (rwlock) vcpulock not locked panic: vcpulock: lock not held Reported-by: syzbot+1dab11e14aa7a159c...@syzkaller.appspotmail.com Reported-by: syzbot+36244e105daffa1a8...@syzkaller.appspotmail.com Reported-by: syzbot+c78b5644c7dc3d9b6...@syzkaller.appspotmail.com ok mlarkin@