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] [day] [month] [year] [list]
Message-ID: <Z1d67E7y2MOZ5tTi@lizhi-Precision-Tower-5810>
Date: Mon, 9 Dec 2024 18:19:08 -0500
From: Frank Li <Frank.li@....com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
	Krzysztof WilczyƄski <kw@...ux.com>,
	Kishon Vijay Abraham I <kishon@...nel.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>, Arnd Bergmann <arnd@...db.de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	Anup Patel <apatel@...tanamicro.com>, Marc Zyngier <maz@...nel.org>,
	linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
	imx@...ts.linux.dev, Niklas Cassel <cassel@...nel.org>,
	dlemoal@...nel.org, jdmason@...zu.us,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v11 3/7] PCI: endpoint: pci-ep-msi: Add MSI address/data
 pair mutable check

On Mon, Dec 09, 2024 at 08:51:52PM +0100, Thomas Gleixner wrote:
> Frank!
>
> On Mon, Dec 09 2024 at 12:48, Frank Li wrote:
>
> > Some MSI controller change address/data pair when irq_set_affinity().
> > Current PCI endpoint can't support this type MSI controller. So add flag
> > MSI_FLAG_MSG_IMMUTABLE in include/linux/msi.h, set this flags in ARM GIC
> > ITS MSI controller and check it when allocate doorbell.
> >
> > Signed-off-by: Frank Li <Frank.Li@....com>
> > ---
> > Change from v9 to v11
> > - new patch
> > ---
> >  drivers/irqchip/irq-gic-v3-its-msi-parent.c | 1 +
> >  drivers/pci/endpoint/pci-ep-msi.c           | 8 ++++++++
> >  include/linux/msi.h                         | 2 ++
>
> This is not how it works and I explained that you to more than once in
> the past.
>
> The change to the interrupt code is standalone and has nothing to do
> with PCI endpoint. The latter is just a user of this.
>
> So this want's to be split into several patches:
>
>    1) add the new flag and a helper function which checks for the flag.

msi.h have not included irqdomain.h. It needs a API in msi.c

+bool msi_domain_is_immutable(struct irq_domain *domain)
+{
+        if (!irq_domain_is_msi_parent(domain))
+                return false;
+
+        return domain->msi_parent_ops->supported_flags & MSI_FLAG_MSG_IMMUTABLE;
+}
+EXPORT_SYMBOL_GPL(msi_domain_is_immutable);

Is it okay?

Frank

>
>    2) add the flag to GICv3 ITS with a proper explanation
>
>    3) Check for it in the PCI endpoint code
>
> >
> > +	if (!dom->msi_parent_ops)
> > +		return -EINVAL;
>
> irq_domain_is_msi_parent()
>
> > +	if (!(dom->msi_parent_ops->supported_flags & MSI_FLAG_MSG_IMMUTABLE)) {
>
> Want's a helper.
>
> Thanks,
>
>         tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ