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: <ZyOyP7M2wuhgPGaF@Asurada-Nvidia>
Date: Thu, 31 Oct 2024 09:37:19 -0700
From: Nicolin Chen <nicolinc@...dia.com>
To: Jason Gunthorpe <jgg@...dia.com>
CC: <kevin.tian@...el.com>, <corbet@....net>, <joro@...tes.org>,
	<suravee.suthikulpanit@....com>, <will@...nel.org>, <robin.murphy@....com>,
	<dwmw2@...radead.org>, <shuah@...nel.org>, <iommu@...ts.linux.dev>,
	<linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<linux-kselftest@...r.kernel.org>, <baolu.lu@...ux.intel.com>,
	<eric.auger@...hat.com>, <jean-philippe@...aro.org>, <mdf@...nel.org>,
	<mshavit@...gle.com>, <shameerali.kolothum.thodi@...wei.com>,
	<smostafa@...gle.com>, <yi.l.liu@...el.com>, <aik@....com>,
	<zhangfei.gao@...aro.org>, <patches@...ts.linux.dev>
Subject: Re: [PATCH v6 07/13] iommufd: Allow pt_id to carry viommu_id for
 IOMMU_HWPT_ALLOC

On Thu, Oct 31, 2024 at 10:14:59AM -0300, Jason Gunthorpe wrote:
> On Wed, Oct 30, 2024 at 02:34:33PM -0700, Nicolin Chen wrote:
> > +static struct iommufd_hwpt_nested *
> > +iommufd_viommu_alloc_hwpt_nested(struct iommufd_viommu *viommu, u32 flags,
> > +				 const struct iommu_user_data *user_data)
> > +{
> > +	struct iommufd_hwpt_nested *hwpt_nested;
> > +	struct iommufd_hw_pagetable *hwpt;
> > +	int rc;
> > +
> > +	if ((flags & ~IOMMU_HWPT_FAULT_ID_VALID) || !user_data->len)
> > +		return ERR_PTR(-EOPNOTSUPP);
> 
> Now that flags exists we are expecting the driver to validate it, so
> this check on flags should be dropped?
> 
> Or we go back to hiding FAULT_ID_VALID from the driver (and keep the flags)?

If we plan to fix the HWPT-based side, I think we should just drop
this check on flags here.

Thanks
Nicolin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ