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: <20250227194749.GJ39591@nvidia.com>
Date: Thu, 27 Feb 2025 15:47:49 -0400
From: Jason Gunthorpe <jgg@...dia.com>
To: Nicolin Chen <nicolinc@...dia.com>
Cc: Robin Murphy <robin.murphy@....com>, kevin.tian@...el.com,
	tglx@...utronix.de, maz@...nel.org, joro@...tes.org,
	will@...nel.org, shuah@...nel.org, iommu@...ts.linux.dev,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-kselftest@...r.kernel.org, eric.auger@...hat.com,
	baolu.lu@...ux.intel.com, yi.l.liu@...el.com, yury.norov@...il.com,
	jacob.pan@...ux.microsoft.com, patches@...ts.linux.dev
Subject: Re: [PATCH v2 3/7] iommu: Make iommu_dma_prepare_msi() into a
 generic operation

On Thu, Feb 27, 2025 at 09:46:55AM -0800, Nicolin Chen wrote:
> I found a bit confusing to use "owner" as the domain->owner isn't
> the same thing in this context. Maybe it should be "driver_ops"?

Maybe, but I wouldn't churn it

> Then, "owner" could be another op structure that holds the owner-
> specific things, such as:
> 	enum iommu_domain_owner { DMA/VFIO/IOMMUFD}; // or flag?

I was thinking about breaking type into something like this:

u32 private_data_owner:2 // DMA/IOMMUFD/None
u32 translation_type:3   // paging/identity/sva/platform/blocked/nested
u32 dma_fq:1             // true/false
u32 dma_api_domain:1     // true/false

Which is close to how it already is with just some breaking up of the
bits differently.. Get rid of the word unmanaged and drop the
IOMMU_DOMAIN_* defines.

I also wanted to separate the "policy" enum that determines which of
the three default domains you get from the type. Lots of type
combinations are not allowed as policy.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ