Re: [PATCH AUTOSEL 7.0-6.1] KVM: x86: Check for injected exceptions before queuing a debug exception

From: Paolo Bonzini

Date: Mon Apr 20 2026 - 11:12:41 EST


On Mon, Apr 20, 2026 at 2:34 PM Sasha Levin <sashal@xxxxxxxxxx> wrote:
> From: Yosry Ahmed <yosry@xxxxxxxxxx>
>
> [ Upstream commit e907b4e72488f1df878e7e8acf88d23e49cb3ca7 ]

Nacked-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>

> - NO Reported-by: (no syzbot tag directly on this patch, though cover
> letter referenced syzkaller repro for the series)

This reproducer is *not* causing trouble in the host.

> **Step 2.4: FIX QUALITY**
> Record: Obviously correct; surgical one-line addition of a boolean
> condition to existing guard. No risk of deadlock/regression - it only
> adds another case that returns -EBUSY, which is existing ioctl behavior
> that userspace must already tolerate. Aligns with architectural
> behavior: you cannot queue a new exception while one is being delivered.

Debugging a guest from the host is not architectural.

> **Step 3.2: ORIGINAL BUGGY COMMIT**
> Record: Bug introduced in commit `4f926bf291863` ("KVM: x86: Polish
> exception injection via KVM_SET_GUEST_DEBUG") by Jan Kiszka, Oct 2009.
> `git describe --contains` = `v2.6.33-rc1~387^2~10`. This means the bug
> exists in every active stable tree (5.4, 5.10, 5.15, 6.1, 6.6, 6.12,
> etc.).

It's not buggy, just incomplete.

> AGAINST backporting:
> - No explicit stable tag/nomination on the list
> - Impact is guest-only (not host)
> - Requires specific user action via KVM_SET_GUEST_DEBUG ioctl
> - For pre-v6.1 trees, minor adaptation is needed (inline the helper's
> check)

Bigger: manual reviews are needed for all these AUTOSEL decisions.
Please don't DoS the maintainers with this stuff. The most stable KVM
is the top of Linus's tree.

Paolo