Re: [PATCH v2 0/4] KVM: Don't let dirty ring resets pass dirty_index
From: James Houghton
Date: Thu Dec 03 2026 - 16:48:07 EST
On Thu, Dec 3, 2026 at 4:36 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>
> On Thu, Dec 03, 2026, James Houghton wrote:
> > Fix a userspace-triggerable WARN in kvm_dirty_ring_push() reported by
> > syzbot[1], and tidy up the memory ordering and annotations around the
> > dirty ring indices while in the area.
>
> ...
>
> > v2:
> > - Rebase onto v7.4-rc5.
> > - Selftest: clear the bogus RESET flags after verifying that KVM doesn't
> > reset them, so that they can't race with KVM pushing to the entries
> > while the ring is being reaped[2].
>
> Doh, I was just a hair late in giving an update. I pushed v1 to kvm-x86/generic
> this morning, with a few comment tweaks to try to clarify some of the subtle
> behavior around updating the index. Can you take a look and make it sure I got
> the fixups right (and didn't break anything else in the process)?
>
> 4be77a92049629483a5ef993d7b76f6a7e914573 KVM: selftests: Verify KVM doesn't reset unused dirty ring entries
> 5510a1d5371805ee0d77876f7f8ae904b792ea33 KVM: Annotate concurrent accesses to dirty ring indices
> 32299d83582a9f7df297dbc1e3dfed30e009f3cd KVM: Use smp_store_release() to mark dirty ring entries as dirtied
> 1a56dadc3c69b8ba654f9b12f3397dc7d451a6f8 KVM: Don't reset dirty ring entries that KVM hasn't pushe
The fix is in there correctly, thanks Sean! Your other changes look
good to me. :) Sorry for the unlucky timing.
> > v1: https://lore.kernel.org/kvm/20261117212913.3634487-1-jthoughton@xxxxxxxxxx