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: <CAKmqyKNqYnULbtE0b3WCOe1VyEGJjo1qzeoLCedtm3mGP2K5fA@mail.gmail.com>
Date: Thu, 6 Mar 2025 17:28:52 +1000
From: Alistair Francis <alistair23@...il.com>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: Alistair Francis <alistair@...stair23.me>, bhelgaas@...gle.com, linux-pci@...r.kernel.org, 
	Jonathan.Cameron@...wei.com, lukas@...ner.de, alex.williamson@...hat.com, 
	christian.koenig@....com, kch@...dia.com, gregkh@...uxfoundation.org, 
	logang@...tatee.com, linux-kernel@...r.kernel.org, chaitanyak@...dia.com, 
	rdunlap@...radead.org
Subject: Re: [PATCH v16 3/4] PCI/DOE: Expose the DOE features via sysfs

On Thu, Mar 6, 2025 at 6:05 AM Bjorn Helgaas <helgaas@...nel.org> wrote:
>
> On Thu, Feb 27, 2025 at 02:34:02PM +1000, Alistair Francis wrote:
> > The PCIe 6 specification added support for the Data Object
> > Exchange (DOE).
>
> > +++ b/drivers/pci/probe.c
> > @@ -2662,6 +2662,9 @@ void pci_device_add(struct pci_dev *dev, struct pci_bus *bus)
> >       WARN_ON(ret < 0);
> >
> >       pci_npem_create(dev);
> > +
> > +     ret = pci_doe_sysfs_init(dev);
> > +     WARN_ON(ret < 0);
>
> IIUC the "doe_features" directory is added implicitly by
> device_add_attrs() in device_add(), but the *contents* of that
> directory can't be done that way because they're dynamic, based on the
> DOE features we discovered.
>
> I see that we WARN_ON() for device_add() failure, but it doesn't
> really seem like much of an error handling strategy in either case.
> I think we'll just get a stack trace that's alarming and probably not
> useful.

I was just following the existing code.

>
> I think it might be more useful to use pci_warn() at the interesting
> places that might fail inside pci_doe_sysfs_init(), e.g., where we
> know the name of the relevant feature, and make pci_doe_sysfs_init()
> itself void.

Sure! Fixed in the next version

Alistair

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ