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]
Date:   Mon, 31 Jan 2022 22:16:41 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     LKML <linux-kernel@...r.kernel.org>, Nishanth Menon <nm@...com>,
        Mark Rutland <mark.rutland@....com>,
        Stuart Yoder <stuyoder@...il.com>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Will Deacon <will@...nel.org>, Ashok Raj <ashok.raj@...el.com>,
        Michael Ellerman <mpe@...erman.id.au>,
        Jassi Brar <jassisinghbrar@...il.com>,
        Sinan Kaya <okaya@...nel.org>,
        iommu@...ts.linux-foundation.org,
        Peter Ujfalusi <peter.ujfalusi@...il.com>,
        Bjorn Helgaas <helgaas@...nel.org>,
        linux-arm-kernel@...ts.infradead.org,
        Jason Gunthorpe <jgg@...dia.com>, linux-pci@...r.kernel.org,
        xen-devel@...ts.xenproject.org, Kevin Tian <kevin.tian@...el.com>,
        Arnd Bergmann <arnd@...db.de>,
        Robin Murphy <robin.murphy@....com>,
        Alex Williamson <alex.williamson@...hat.com>,
        Cedric Le Goater <clg@...d.org>,
        Santosh Shilimkar <ssantosh@...nel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Megha Dey <megha.dey@...el.com>,
        Juergen Gross <jgross@...e.com>,
        Tero Kristo <kristo@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Vinod Koul <vkoul@...nel.org>, Marc Zygnier <maz@...nel.org>,
        dmaengine@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [patch V3 28/35] PCI/MSI: Simplify pci_irq_get_affinity()

Guenter,

On Mon, Jan 31 2022 at 07:21, Guenter Roeck wrote:
> Sure. Please see http://server.roeck-us.net/qemu/x86/.
> The logs are generated with with v5.16.4.

thanks for providing the data. It definitely helped me to leave the
state of not seeing the wood for the trees. Fix below.

Thanks,

        tglx
---
Subject: PCI/MSI: Remove bogus warning in pci_irq_get_affinity()
From: Thomas Gleixner <tglx@...utronix.de>
Date: Mon, 31 Jan 2022 22:02:46 +0100

The recent overhaul of pci_irq_get_affinity() introduced a regression when
pci_irq_get_affinity() is called for an MSI-X interrupt which was not
allocated with affinity descriptor information.

The original code just returned a NULL pointer in that case, but the rework
added a WARN_ON() under the assumption that the corresponding WARN_ON() in
the MSI case can be applied to MSI-X as well.

In fact the MSI warning in the original code does not make sense either
because it's legitimate to invoke pci_irq_get_affinity() for a MSI
interrupt which was not allocated with affinity descriptor information.

Remove it and just return NULL as the original code did.

Fixes: f48235900182 ("PCI/MSI: Simplify pci_irq_get_affinity()")
Reported-by: Guenter Roeck <linux@...ck-us.net>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
 drivers/pci/msi/msi.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/pci/msi/msi.c
+++ b/drivers/pci/msi/msi.c
@@ -1111,7 +1111,8 @@ const struct cpumask *pci_irq_get_affini
 	if (!desc)
 		return cpu_possible_mask;
 
-	if (WARN_ON_ONCE(!desc->affinity))
+	/* MSI[X] interrupts can be allocated without affinity descriptor */
+	if (!desc->affinity)
 		return NULL;
 
 	/*

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ