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: <20240621125804.GP791043@ziepe.ca>
Date: Fri, 21 Jun 2024 09:58:04 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: Baolu Lu <baolu.lu@...ux.intel.com>
Cc: Vasant Hegde <vasant.hegde@....com>,
	"Tian, Kevin" <kevin.tian@...el.com>,
	Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
	Robin Murphy <robin.murphy@....com>,
	Jacek Lawrynowicz <jacek.lawrynowicz@...ux.intel.com>,
	"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] iommu/vt-d: Fix missed device TLB cache tag

On Fri, Jun 21, 2024 at 09:44:27AM +0800, Baolu Lu wrote:

> Enabling/Disabling ATS on domain attach seems like a feasible approach.
> The ATS requirement information (required/disallowed/neutral) could be
> included as an opt-in option in the domain attach path. This likely
> applies to PASID attachments and VF/PF devices. The iommu driver
> maintains the per-device ATS refcount and enables it for the first
> request and disables it after the last one. The attachment fails
> accordingly if the hardware capability doesn't match the domain attach
> requirement.

Yes. if we do this the core code would have to take some
responsibility to manage ATS and PASID needs together. It is a bit
tricky potentially, but probably better than having drivers repeat the
same logic.

But it probably does require the drivers actually implement hitless
replace. I'd imagin a core driven flow is something like:

 - Install an identity domain without ATS
 - Decide we want a SVA pasid
 - Replace the identiy domain with the same identity domain and ATS
 - Install the SVA pasid

(assuming we want some policy like only enable ATS when needed)

> Perhaps we could further include PRI as a domain attach option,
> indicating that the domain requires IOPF functionality. This would allow
> us to simplify the SVA and IOMMUFD by hiding device and IOMMU details
> within the IOMMU driver.

This is my desire, if the domain has a fault handler then the driver
should just make PRI work on attach or fail attach.

None of the weird feature stuff is needed. We are getting closer, I
think the SVA enable stuff is almost all NO-OP'd.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ