Re: [v5.15] WARNING in kvm_arch_vcpu_ioctl_run

From: Muhammad Usama Anjum
Date: Mon Aug 28 2023 - 11:24:34 EST


On Monday, August 28, 2023 08:11 PM PKT, Sean Christopherson <seanjc@xxxxxxxxxx> wrote:

> On Mon, Aug 28, 2023, Muhammad Usama Anjum wrote:
> > On 5/5/23 1:28 PM, syzbot wrote:
> > > syzbot has found a reproducer for the following issue on:
> > >
> > > HEAD commit: 8a7f2a5c5aa1 Linux 5.15.110
> > This same warning has also been found on 6.1.21.
> >
> > > git tree: linux-5.15.y
> > > console output: https://syzkaller.appspot.com/x/log.txt?x=15f12318280000
> > > kernel config: https://syzkaller.appspot.com/x/.config?x=ba8d5c9d6c5289f
> > > dashboard link: https://syzkaller.appspot.com/bug?extid=412c9ae97b4338c5187e
> > > compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
> > > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10e13c84280000
> > > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=149d9470280000
> > I've tried all the C and syz reproducers. I've also tried syz-crash which
> > launched multiple instances of VMs and ran syz reproducer. But the issue
> > didn't get reproduced.
> >
> > I don't have kvm skills. Can someone have a look at the the warning
> > (probably by static analysis)?
> >
> > >
> > > Downloadable assets:
> > > disk image: https://storage.googleapis.com/syzbot-assets/fc04f54c047f/disk-8a7f2a5c.raw.xz
> > > vmlinux: https://storage.googleapis.com/syzbot-assets/6b4ba4cb1191/vmlinux-8a7f2a5c.xz
> > > kernel image: https://storage.googleapis.com/syzbot-assets/d927dc3f9670/bzImage-8a7f2a5c.xz
> > >
> > > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > > Reported-by: syzbot+412c9ae97b4338c5187e@xxxxxxxxxxxxxxxxxxxxxxxxx
> > >
> > > ------------[ cut here ]------------
> > > WARNING: CPU: 0 PID: 3502 at arch/x86/kvm/x86.c:10310 kvm_arch_vcpu_ioctl_run+0x1d63/0x1f80
>
> "Fixed" by https://lore.kernel.org/all/20230808232057.2498287-1-seanjc@xxxxxxxxxx,
> in quotes because sadly the fix was to simply delete the sanity check :-(

Thank you so much Sean. Thank you so much Sean. Syzbot has been finding the issue in LTS kernels. I'm not sure if we should backport a patch which is just removing a false warning.

#syz fix: KVM: x86: Remove WARN sanity check on hypervisor timer vs. UNINITIALIZED vCPU