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-next>] [day] [month] [year] [list]
Message-ID: <ccb1b2ca-0d62-4c74-ada3-89cce13b8de3@nvidia.com>
Date: Thu, 25 Jul 2024 08:34:48 +0300
From: Shay Drori <shayd@...dia.com>
To: <tglx@...utronix.de>
CC: <linux-kernel@...r.kernel.org>
Subject: pci_msix_alloc_irq_at() affinity

Hello Thomas

I did some testing with pci_msix_alloc_irq_at() and I noticed that the
affinity provided, via “struct irq_affinity_desc *af_desc”, doesn’t have
any affect.

After some digging, I found out that irq_setup_affinity(), which is
called by request_irq(), is setting the affinity as all the CPUs online,
ignoring the affinity provided in pci_msix_alloc_irq_at().
Is this on purpose or a bug?

P.S. The bellow diff honors the affinity provided in
pci_msix_alloc_irq_at()

--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -530,6 +530,7 @@ static int alloc_descs(unsigned int start, unsigned 
int cnt, int node,
                                 flags = IRQD_AFFINITY_MANAGED |
                                         IRQD_MANAGED_SHUTDOWN;
                         }
+                 flags |= IRQD_AFFINITY_SET;
                         mask = &affinity->mask;
                         node = cpu_to_node(cpumask_first(mask));
                         affinity++;

thanks
Shay Drori

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ