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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250107174842.GN5556@nvidia.com>
Date: Tue, 7 Jan 2025 13:48:42 -0400
From: Jason Gunthorpe <jgg@...dia.com>
To: Jeremy Linton <jeremy.linton@....com>
Cc: Jonathan Cameron <Jonathan.Cameron@...wei.com>,
	Wathsala Vithanage <wathsala.vithanage@....com>,
	linux-acpi@...r.kernel.org, linux-pci@...r.kernel.org,
	acpica-devel@...ts.linux.dev, linux-kernel@...r.kernel.org,
	lenb@...nel.org, robert.moore@...el.com, bhelgaas@...gle.com,
	wei.huang2@....com, honnappa.nagarahalli@....com,
	dhruv.tripathi@....com, rob.herring@....com
Subject: Re: [RFC 0/2] GENL interface for ACPI _DSM methods

On Tue, Jan 07, 2025 at 11:37:01AM -0600, Jeremy Linton wrote:
> Hi,
> 
> On 1/6/25 12:01 PM, Jonathan Cameron wrote:
> > On Mon, 6 Jan 2025 16:30:43 +0000
> > Wathsala Vithanage <wathsala.vithanage@....com> wrote:
> > 
> > > Linux v6.13-rc1 added support for PCIe TPH and direct cache injection.
> > > As already described in the patch set[1] that introduced this feature,
> > > the cache injection in supported hardware allows optimal utilization of
> > > platform resources for specific requests on the PCIe bus. However, the
> > > patch set [1] implements the functionality for usage within the kernel.
> > > But certain user space applications, especially those whose performance
> > > is sensitive to the latency of inbound writes as seen by a CPU core, may
> > > benefit from using this information (E.g., the DPDK cache stashing
> > > feature discussed in RFC [2]). 

There is no way for userspace to program TPH information into a PCI
device without going through a kernel driver, and the kernel driver
must be the exclusive owner of the steering tag configuration or chaos
would ensue. Having a way for sysfs to override this seems very wrong
to me, and I think you should not go in this direction.

DPDK runs on VFIO or RDMA. It would natural to have an VFIO native API
to manipulate the steering tags, and we are already discussing what
RDMA support for steering tag would look like.

> > Superficially this feels like another potential interface that could be wrapped
> > up under appropriate fwctl. Jason, what do you think?

As above, I think this very squarely belongs under the appropriate
subsystems that are providing the kernel drivers for the device. There
is no reasonable way to share steering tags with unrelated userspace
through any mechanism. Basically it fails the independence test of
fwctl.

> I think this was similar to a conversation we had internally, which was
> basically to detect the PCIe extended capability and export a 'steering'
> entry in sysfs on each PCIe device which can take a logical cpu/cache value,
> translate those on write to the ACPI cpu/cache id's, make the firmware call,
> then directly update the PCIe device's capability with the result. 

Seems wrong, driver must do this. If the driver was already using that
entry for something else you've just wrecked it.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ