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]
Date:   Wed, 18 May 2022 14:43:33 +0800
From:   Baolu Lu <baolu.lu@...ux.intel.com>
To:     Jason Gunthorpe <jgg@...dia.com>,
        Robin Murphy <robin.murphy@....com>
Cc:     baolu.lu@...ux.intel.com, Joerg Roedel <joro@...tes.org>,
        Christoph Hellwig <hch@...radead.org>,
        Kevin Tian <kevin.tian@...el.com>,
        Ashok Raj <ashok.raj@...el.com>, Will Deacon <will@...nel.org>,
        Jean-Philippe Brucker <jean-philippe@...aro.com>,
        Eric Auger <eric.auger@...hat.com>,
        Liu Yi L <yi.l.liu@...el.com>,
        Jacob jun Pan <jacob.jun.pan@...el.com>,
        iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/5] iommu: Add blocking_domain_ops field in iommu_ops

On 2022/5/17 21:13, Jason Gunthorpe wrote:
> On Tue, May 17, 2022 at 01:43:03PM +0100, Robin Murphy wrote:
> 
>> FWIW from my point of view I'm happy with having a .detach_dev_pasid op
>> meaning implicitly-blocked access for now.
> 
> If this is the path then lets not call it attach/detach
> please. 'set_dev_pasid' and 'set_dev_blocking_pasid' are clearer
> names.

Sure. And with the blocking domain implemented, the
set_dev_blocking_pasid could be deprecated.

> 
>> On SMMUv3, PASIDs don't mix with our current notion of
>> IOMMU_DOMAIN_IDENTITY (nor the potential one for
>> IOMMU_DOMAIN_BLOCKED), so giving PASIDs functional symmetry with
>> devices would need significantly more work anyway.
> 
> There is no extra work in the driver, beyond SMMU having to implement
> a blocking domain. The blocking domain's set_dev_pasid op simply is
> whatever set_dev_blocking_pasid would have done on the unmanaged
> domain.
> 
> identity doesn't come into this, identity domains should have a NULL
> set_dev_pasid op if the driver can't support using it on a PASID.
> 
> IMHO blocking_domain->ops->set_dev_pasid() is just a more logical name
> than domain->ops->set_dev_blocking_pasid() - especially since VFIO
> would like drivers to implement blocking domain anyhow.

Perhaps implementing blocking domains for intel and smmuv3 iommu drivers
seem to be a more practical start.

Best regards,
baolu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ