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] [day] [month] [year] [list]
Message-ID: <8c46c7a7-dc7b-72d4-2d99-91b8967ff042@linux.intel.com>
Date:   Thu, 4 Aug 2022 10:42:48 +0800
From:   Baolu Lu <baolu.lu@...ux.intel.com>
To:     Jason Gunthorpe <jgg@...dia.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>,
        Robin Murphy <robin.murphy@....com>,
        Jean-Philippe Brucker <jean-philippe@...aro.com>,
        Dave Jiang <dave.jiang@...el.com>,
        Vinod Koul <vkoul@...nel.org>,
        Eric Auger <eric.auger@...hat.com>,
        Liu Yi L <yi.l.liu@...el.com>,
        Jacob jun Pan <jacob.jun.pan@...el.com>,
        Zhangfei Gao <zhangfei.gao@...aro.org>,
        Zhu Tony <tony.zhu@...el.com>, iommu@...ts.linux.dev,
        linux-kernel@...r.kernel.org,
        Jean-Philippe Brucker <jean-philippe@...aro.org>
Subject: Re: [PATCH v10 04/12] iommu: Add attach/detach_dev_pasid iommu
 interface

On 2022/8/4 3:03, Jason Gunthorpe wrote:
> On Wed, Aug 03, 2022 at 09:07:35PM +0800, Baolu Lu wrote:
>> +/**
>> + * iommu_device_claim_pasid_owner() - Set ownership of a pasid on device
>> + * @dev: the device.
>> + * @pasid: the pasid of the device.
>> + * @owner: caller specified pointer. Used for exclusive ownership.
>> + *
>> + * Return 0 if it is allowed, otherwise an error.
>> + */
>> +int iommu_device_claim_pasid_owner(struct device *dev, ioasid_t pasid, void
>> *owner)
> 
> I don't see a use case for a special "pasid owner"
> 
> PASID is no different from normal DMA. If the calling driver already
> has the proper ownership of the device/group then it is fine for that
> driver to use any kind of IOMMU attachment, RID, PASID, whatever. It
> doesn't matter *how* the attachment is made.

Agreed again.

The Linux kernel manages a device at the device driver level, and all
PASIDs are managed by a device driver. There is really no need to manage
ownership at the PASID level. The current DMA ownership mechanism can
manage the exclusions between kernel drivers and user space drivers.
Sorry that I over considered.

> Remember the series that got dropped about converting all the drivers
> to the new ownership scheme? That is how it should work - owernship
> and domain attach are two different operations and do not get mixed
> confusingly together. (and are you going to repost that series? It
> would be great to get it done)

Yes, of cause. I have also some other pending tasks, lock-free page
table traversal, driver ATS interfaces, ownership scheme for kernel
drivers, blocking domain improvement, and etc. These are enough to keep
me busy for a while. :-) If anyone in the community is also interested
in any task, I will be grateful.

Best regards,
baolu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ