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: <20250618161136.39029872@DESKTOP-0403QTC.>
Date: Wed, 18 Jun 2025 16:11:36 -0700
From: Jacob Pan <jacob.pan@...ux.microsoft.com>
To: Jason Gunthorpe <jgg@...dia.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>, jacob.pan@...ux.microsoft.com
Subject: Re: [PATCH v2 2/2] vfio: Fix unbalanced vfio_df_close call in
 no-iommu mode

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.

Thanks,

Jacob


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ