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] [day] [month] [year] [list]
Message-ID: <20250618232558.GA1643312@nvidia.com>
Date: Wed, 18 Jun 2025 20:25:58 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Jacob Pan <jacob.pan@...ux.microsoft.com>
Cc: Alex Williamson <alex.williamson@...hat.com>,
	linux-kernel@...r.kernel.org,
	"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
	"Liu, Yi L" <yi.l.liu@...el.com>, Zhang Yu <zhangyu1@...rosoft.com>,
	Easwar Hariharan <eahariha@...ux.microsoft.com>,
	Saurabh Sengar <ssengar@...ux.microsoft.com>
Subject: Re: [PATCH v2 2/2] vfio: Fix unbalanced vfio_df_close call in
 no-iommu mode

On Wed, Jun 18, 2025 at 04:11:36PM -0700, Jacob Pan wrote:
> Hi Jason,
> 
> On Mon, 16 Jun 2025 17:05:58 -0300
> Jason Gunthorpe <jgg@...dia.com> wrote:
> 
> > On Mon, Jun 16, 2025 at 01:40:04PM -0600, Alex Williamson wrote:
> > > --- a/drivers/vfio/group.c
> > > +++ b/drivers/vfio/group.c
> > > @@ -192,18 +192,18 @@ static int vfio_df_group_open(struct
> > > vfio_device_file *df)
> > >  		 * implies they expected translation to exist
> > >  		 */
> > >  		if (!capable(CAP_SYS_RAWIO) ||
> > > -		    vfio_iommufd_device_has_compat_ioas(device,
> > > df->iommufd))
> > > +		    vfio_iommufd_device_has_compat_ioas(device,
> > > df->iommufd)) { ret = -EPERM;
> > > -		else
> > > -			ret = 0;
> > > -		goto out_put_kvm;
> > > +			goto out_put_kvm;
> > > +		}
> > >  	}
> > > 
> > > 
> > > And add a noiommu exit branch to _iommufd_bind, symmetric to unbind.
> > > Right?  Thanks,  
> > 
> > Just comparing to the original
> > 
> > +	if (iommufd) {
> > +		if (!vfio_device_is_noiommu(device))
> > +			ret = vfio_df_iommufd_bind(df);
> > 
> > Isn't being captured, so it needs another hunk in
> > vfio_df_iommufd_bind()
> > 
> OK, will send out v3 with this concise fix. I am also working on the
> noiommu special mode as you suggested, then we can allow bind again.

Sure sounds good

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ