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]
Message-ID: <20250624181616.GE72557@ziepe.ca>
Date: Tue, 24 Jun 2025 15:16:16 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: Alex Mastro <amastro@...com>
Cc: Alex Williamson <alex.williamson@...hat.com>, peterx@...hat.com,
	kbusch@...nel.org, kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vfio/pci: print vfio-device name to fdinfo

On Tue, Jun 24, 2025 at 09:35:58AM -0700, Alex Mastro wrote:

> > The userspace can deduce more information, like the actual PCI BDF, by
> > mapping the name through sysfs.
> 
> In the vfio cdev case, <pci sysfs path>/vfio-dev/X tells you the
> /dev/vfio/devices/X mapping, but is there a straightforward way to map in the
> opposite direction?

There will be a symlink under /sys/class/vfio-xx/XX pointing to the
<pci sysfs path>/vfio-dev/X directory

And another symlink under /sys/dev/char/XX:XX doing the same.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ