Re: [PATCH v2] vfio/pci: Do vf_token checks for VFIO_DEVICE_BIND_IOMMUFD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 14, 2025 at 09:12:52AM -0600, Alex Williamson wrote:
> On Mon, 14 Jul 2025 11:29:04 -0300
> Jason Gunthorpe <jgg@xxxxxxxxxx> wrote:
> 
> > On Mon, Jul 14, 2025 at 09:12:30PM +0800, Yi Liu wrote:
> > > On 2025/7/10 23:30, Jason Gunthorpe wrote:  
> > > > This was missed during the initial implementation. The VFIO PCI encodes
> > > > the vf_token inside the device name when opening the device from the group
> > > > FD, something like:
> > > > 
> > > >    "0000:04:10.0 vf_token=bd8d9d2b-5a5f-4f5a-a211-f591514ba1f3"
> > > > 
> > > > This is used to control access to a VF unless there is co-ordination with
> > > > the owner of the PF.
> > > > 
> > > > Since we no longer have a device name, pass the token directly through
> > > > VFIO_DEVICE_BIND_IOMMUFD using an optional field indicated by
> > > > VFIO_DEVICE_BIND_TOKEN.  
> > > 
> > > two nits though I think the code is clear enough :)
> > > 
> > > s/Since we no longer have a device name/Since we no longer have a device
> > > name in the device cdev path/
> > > 
> > > s/VFIO_DEVICE_BIND_TOKEN/VFIO_DEVICE_BIND_FLAG_TOKEN/  
> > 
> > Alex, can you fix this when applying the v3 version?
> 
> Hmm, where's this v3 version?  Did you already send a version with
> Shameer's fix (s/bind.argsz/user_size)?  Lore can't find it.  Thanks,

Hmm! I seems I prepared it and then got called away before I pressed
send. :\

Jason




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux