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  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:   Tue, 10 Aug 2021 14:51:20 -0600
From:   Alex Williamson <>
To:     Peter Xu <>
Cc:     Christoph Hellwig <>,
        Jason Gunthorpe <>,,
Subject: Re: [PATCH 3/7] vfio/pci: Use vfio_device_unmap_mapping_range()

On Tue, 10 Aug 2021 15:02:10 -0400
Peter Xu <> wrote:

> On Tue, Aug 10, 2021 at 10:53:50AM +0200, Christoph Hellwig wrote:
> > On Thu, Aug 05, 2021 at 11:07:35AM -0600, Alex Williamson wrote:  
> > > +static void vfio_pci_zap_bars(struct vfio_pci_device *vdev)
> > >  {
> > > +	vfio_device_unmap_mapping_range(&vdev->vdev,
> > 
> > Maybe make this a little more readable by having local variables:  
> Or just pass in unmap_mapping_range(start=0, len=0)?  As unmap_mapping_range()
> understands len==0 as "to the end of file".  Thanks,

But we're not actually trying to unmap the entire device fd, we're only
targeting the ranges of it that correspond to standard MMIO resources
of the device.  Our vma-to-pfn function for vfio-pci also only knows
how to lookup vmas in this range.  If there were mmap'able regions
outside of this, for example provided by vendor specific extensions, we
a) don't generically know if they're related to the device itself or
some supporting information managed in software (ex. IGD OpRegion) and
b) don't know how to lookup the pfn to remap them when MMIO is

I don't think we have any such extensions today, but we might with
vfio-pci-core and we'd need to figure out how to include those regions
in some future work.  Thanks,


Powered by blists - more mailing lists