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: <BN9PR11MB5276BE861CF22DDC11D9D8038CED9@BN9PR11MB5276.namprd11.prod.outlook.com>
Date:   Tue, 12 Apr 2022 23:36:55 +0000
From:   "Tian, Kevin" <kevin.tian@...el.com>
To:     Lu Baolu <baolu.lu@...ux.intel.com>,
        Joerg Roedel <joro@...tes.org>,
        Jason Gunthorpe <jgg@...dia.com>,
        Christoph Hellwig <hch@...radead.org>,
        "Raj, Ashok" <ashok.raj@...el.com>, Will Deacon <will@...nel.org>,
        "Robin Murphy" <robin.murphy@....com>,
        Jean-Philippe Brucker <jean-philippe@...aro.com>
CC:     Eric Auger <eric.auger@...hat.com>,
        "Liu, Yi L" <yi.l.liu@...el.com>,
        "Pan, Jacob jun" <jacob.jun.pan@...el.com>,
        "iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH RFC v3 08/12] iommu/sva: Use attach/detach_pasid_dev in
 SVA interfaces

> From: Lu Baolu <baolu.lu@...ux.intel.com>
> Sent: Tuesday, April 12, 2022 8:53 PM
> 
> >
> >> +	if (!handle) {
> >> +		ret = -ENOMEM;
> >> +		goto out_put_ioas;
> >> +	}
> >> +
> >> +	/* The reference to ioas will be kept until domain free. */
> >> +	domain = iommu_sva_alloc_domain(dev, ioas);
> >
> > Shouldn't we first try whether existing domains are compatible to this
> > device?
> 
> If we think that here domain represents a hardware pagetable actually
> used by IOMMU for a {device, pasid}, we are able to use per-{device,
> pasid} domain without checking compatibility. Sharing a domain among
> devices under the same IOMMU may be an optimization. That could be done
> in the IOMMU driver just like what vt-d driver is doing for pass-through
> DMA domains.
> 

there is only one hardware page table per mm in this case. Multiple domains
are required only due to compatibility reason as Jason/Robin pointed out
in SMMU case. Given all other places create multiple domains per ioas only
upon incompatibility, probably it's more consistent to doing so in this path
too...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ