lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <699708d7f3da2e2a41e3282c1a87e6f4d69a4e89.camel@intel.com>
Date: Wed, 28 Jan 2026 02:22:27 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "seanjc@...gle.com" <seanjc@...gle.com>, "dwmw2@...radead.org"
	<dwmw2@...radead.org>
CC: "shaju.abraham@...anix.com" <shaju.abraham@...anix.com>,
	"khushit.shah@...anix.com" <khushit.shah@...anix.com>, "x86@...nel.org"
	<x86@...nel.org>, "bp@...en8.de" <bp@...en8.de>, "stable@...r.kernel.org"
	<stable@...r.kernel.org>, "hpa@...or.com" <hpa@...or.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"mingo@...hat.com" <mingo@...hat.com>, "dave.hansen@...ux.intel.com"
	<dave.hansen@...ux.intel.com>, "pbonzini@...hat.com" <pbonzini@...hat.com>,
	"kvm@...r.kernel.org" <kvm@...r.kernel.org>, "Kohler, Jon" <jon@...anix.com>,
	"tglx@...utronix.de" <tglx@...utronix.de>
Subject: Re: [PATCH v6] KVM: x86: Add x2APIC "features" to control EOI
 broadcast suppression

On Tue, 2026-01-27 at 14:36 -0800, David Woodhouse wrote:
> On Tue, 2026-01-27 at 13:49 -0800, Sean Christopherson wrote:
> > 
> > Nope, we should be good on that front, kvm->arch.irqchip_mode can't be changed
> > once its set.  I.e. the irqchip_split() check could get a false negative if it's
> > racing with KVM_CREATE_IRQCHIP, but it can't get a false positive and thus
> > incorrectly allow KVM_X2APIC_ENABLE_SUPPRESS_EOI_BROADCAST.
> 
> Ah, so userspace which checks all the kernel's capabilities *first*
> will not see KVM_X2APIC_ENABLE_SUPPRESS_EOI_BROADCAST advertised,
> because it needs to enable KVM_CAP_SPLIT_IRQCHIP first?
> 
> I guess that's tolerable¹ but the documentation could make it clearer,
> perhaps? I can see VMMs silently failing to detect the feature because
> they just don't set split-irqchip before checking for it? 
> 
> 
> ¹ although I still kind of hate it and would have preferred to have the
>   I/O APIC patch; userspace still has to intentionally *enable* that
>   combination. But OK, I've reluctantly conceded that.

To make it even more robust, perhaps we can grab kvm->lock mutex in
kvm_vm_ioctl_enable_cap() for KVM_CAP_X2APIC_API, so that it won't race with
KVM_CREATE_IRQCHIP (which already grabs kvm->lock) and
KVM_CAP_SPLIT_IRQCHIP?

Even more, we can add additional check in KVM_CREATE_IRQCHIP to return -
EINVAL when it sees kvm->arch.suppress_eoi_broadcast_mode is
KVM_X2APIC_ENABLE_SUPPRESS_EOI_BROADCAST?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ