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:   Fri, 11 Aug 2023 21:47:47 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Alistair Francis <alistair23@...il.com>
Cc:     Damien Le Moal <dlemoal@...nel.org>, 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, logang@...tatee.com,
        linux-kernel@...r.kernel.org, chaitanyak@...dia.com,
        rdunlap@...radead.org, Alistair Francis <alistair.francis@....com>
Subject: Re: [PATCH v4] PCI/DOE: Expose the DOE protocols via sysfs

On Fri, Aug 11, 2023 at 02:40:45PM -0400, Alistair Francis wrote:
> On Thu, Aug 10, 2023 at 9:04 PM Damien Le Moal <dlemoal@...nel.org> wrote:
> >
> > On 8/11/23 01:33, Alistair Francis wrote:
> > > The PCIe 6 specification added support for the Data Object Exchange (DOE).
> > > When DOE is supported the Discovery Data Object Protocol must be
> > > implemented. The protocol allows a requester to obtain information about
> > > the other DOE protocols supported by the device.
> > >
> > > The kernel is already querying the DOE protocols supported and cacheing
> > > the values. This patch exposes the values via sysfs. This will allow
> > > userspace to determine which DOE protocols are supported by the PCIe
> > > device.
> > >
> > > By exposing the information to userspace tools like lspci can relay the
> > > information to users. By listing all of the supported protocols we can
> > > allow userspace to parse and support the list, which might include
> > > vendor specific protocols as well as yet to be supported protocols.
> > >
> > > Each DOE feature is exposed as a single file. The files are empty and
> > > the information is contained in the file name.
> >
> > s/feature/protocol ?
> 
> Fixed
> 
> >
> > Personally, I would still have each file content repeat the same information as
> > the file name specifies. That is, file value == file name. That will avoid
> > people getting confused as empty sysfs files are rather uncommon.
> 
> I don't see an obvious way to implement that with the .show()
> function. I don't see a clear way to know what file the user accessed.

The show callback gets a pointer to the attribute it was called with, so
you know the file that was opened and can figure it out from there as to
what it should print out.

I think right now it returns an error, right?  That's not good as
userspace is going to think "this attribute really isn't there if I
can't read from it" as that is how all other sysfs files work.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ