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]
Date:   Fri, 25 Oct 2019 07:51:47 -0500
From:   Bjorn Helgaas <helgaas@...nel.org>
To:     Robin Murphy <robin.murphy@....com>
Cc:     Yunsheng Lin <linyunsheng@...wei.com>, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org, mhocko@...nel.org,
        peterz@...radead.org, geert@...ux-m68k.org,
        gregkh@...uxfoundation.org, paul.burton@...s.com
Subject: Re: [PATCH] PCI: Warn about host bridge device when its numa node is
 NO_NODE

On Thu, Oct 24, 2019 at 11:16:41AM +0100, Robin Murphy wrote:
> On 2019-10-23 6:10 pm, Bjorn Helgaas wrote:

> >      PCI: Warn if no host bridge NUMA node info
> >      In pci_call_probe(), we try to run driver probe functions on the node where
> >      the device is attached.  If we don't know which node the device is attached
> >      to, the driver will likely run on the wrong node.  This will still work,
> >      but performance will not be as good as it could be.
> 
> Is it guaranteed to be purely a performance issue? In other words, is there
> definitely no way a physical node could be disabled via idle/hotplug/etc.
> such that unattributed devices can silently disappear while still in use?

I think so.  At least, if it's more than a performance issue, I have
no idea what sort of problem might happen or how to deal with it.

> > @@ -897,6 +897,9 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
> >   	else
> >   		pr_info("PCI host bridge to bus %s\n", name);
> > +	if (nr_node_ids > 1 && pcibus_to_node(bus) == NUMA_NO_NODE)
> > +		dev_warn(&bus->dev, "Unknown NUMA node; performance will be reduced\n");
> 
> I think this still deserves the FW_BUG prefix.

Putting the warning here in pci_register_host_bridge() is convenient
for now but doesn't seem like the ideal place.

I'd rather have the warning at the point where we get the node number,
e.g., in pci_acpi_root_get_node() or of_node_to_nid(), where we would
know what's actually required by spec and we could point to the
specific ACPI device or DT device node that's broken.  Then I think
we'd have a better case for using FW_BUG.

I'm a little hesitant to use FW_BUG here in pci_register_host_bridge()
because we don't know where the node number was supposed to come from,
so we can't reliably determine that the lack of one is a bug.

Bjorn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ