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: Mon, 27 May 2024 01:33:25 +0000
From: "Tian, Kevin" <kevin.tian@...el.com>
To: Jason Gunthorpe <jgg@...pe.ca>
CC: Baolu Lu <baolu.lu@...ux.intel.com>, Joerg Roedel <joro@...tes.org>, "Will
 Deacon" <will@...nel.org>, Robin Murphy <robin.murphy@....com>,
	"Jean-Philippe Brucker" <jean-philippe@...aro.org>, Nicolin Chen
	<nicolinc@...dia.com>, "Liu, Yi L" <yi.l.liu@...el.com>, Jacob Pan
	<jacob.jun.pan@...ux.intel.com>, "Joel Granados" <j.granados@...sung.com>,
	"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
	"virtualization@...ts.linux-foundation.org"
	<virtualization@...ts.linux-foundation.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v5 7/9] iommufd: Associate fault object with
 iommufd_hw_pgtable

> From: Jason Gunthorpe <jgg@...pe.ca>
> Sent: Friday, May 24, 2024 10:25 PM
> 
> On Mon, May 20, 2024 at 03:39:54AM +0000, Tian, Kevin wrote:
> > > From: Baolu Lu <baolu.lu@...ux.intel.com>
> > > Sent: Monday, May 20, 2024 10:19 AM
> > >
> > > On 5/15/24 4:50 PM, Tian, Kevin wrote:
> > > >> From: Lu Baolu <baolu.lu@...ux.intel.com>
> > > >> Sent: Tuesday, April 30, 2024 10:57 PM
> > > >>
> > > >> @@ -308,6 +314,19 @@ int iommufd_hwpt_alloc(struct
> iommufd_ucmd
> > > >> *ucmd)
> > > >>   		goto out_put_pt;
> > > >>   	}
> > > >>
> > > >> +	if (cmd->flags & IOMMU_HWPT_FAULT_ID_VALID) {
> > > >> +		struct iommufd_fault *fault;
> > > >> +
> > > >> +		fault = iommufd_get_fault(ucmd, cmd->fault_id);
> > > >> +		if (IS_ERR(fault)) {
> > > >> +			rc = PTR_ERR(fault);
> > > >> +			goto out_hwpt;
> > > >> +		}
> > > >> +		hwpt->fault = fault;
> > > >> +		hwpt->domain->iopf_handler = iommufd_fault_iopf_handler;
> > > >> +		hwpt->domain->fault_data = hwpt;
> > > >> +	}
> > > >
> > > > this is nesting specific. why not moving it to the nested_alloc()?
> > >
> > > Nesting is currently a use case for userspace I/O page faults, but this
> > > design should be general enough to support other scenarios as well.
> >
> > Do we allow user page table w/o nesting?
> >
> > What would be a scenario in which the user doesn't manage the
> > page table but still want to handle the I/O page fault? The fault
> > should always be delivered to the owner managing the page table...
> 
> userspace always manages the page table, either it updates the IOPTE
> directly in a nest or it calls iommufd map operations.
> 
> Ideally the driver will allow PRI on normal cases, although it will
> probably never be used.
> 

But now it's done in a half way.

valid_flags in normal cases doesn't accept a fault ID. but we then
handle the fault ID flag generally above.

I'd like to see a consistent message throughout the path. 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ