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: <20231014000320.GC282036@ziepe.ca>
Date:   Fri, 13 Oct 2023 21:03:20 -0300
From:   Jason Gunthorpe <jgg@...pe.ca>
To:     "Zhang, Tina" <tina.zhang@...el.com>
Cc:     "Tian, Kevin" <kevin.tian@...el.com>,
        Lu Baolu <baolu.lu@...ux.intel.com>,
        Michael Shavit <mshavit@...gle.com>,
        Vasant Hegde <vasant.hegde@....com>,
        Nicolin Chen <nicolinc@...dia.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "iommu@...ts.linux.dev" <iommu@...ts.linux.dev>
Subject: Re: [PATCH v7 4/5] iommu: Support mm PASID 1:n with sva domains

On Fri, Oct 13, 2023 at 09:57:30AM +0000, Zhang, Tina wrote:
> Hi,
> 
> > -----Original Message-----
> > From: Jason Gunthorpe <jgg@...pe.ca>
> > Sent: Thursday, October 12, 2023 9:43 PM
> > To: Zhang, Tina <tina.zhang@...el.com>
> > Cc: Tian, Kevin <kevin.tian@...el.com>; Lu Baolu <baolu.lu@...ux.intel.com>;
> > Michael Shavit <mshavit@...gle.com>; Vasant Hegde
> > <vasant.hegde@....com>; Nicolin Chen ^C-cc=iommu @ lists . linux . dev
> > <nicolinc@...dia.com>; linux-kernel@...r.kernel.org
> > Subject: Re: [PATCH v7 4/5] iommu: Support mm PASID 1:n with sva domains
> > 
> > On Thu, Oct 12, 2023 at 11:01:11AM +0800, Tina Zhang wrote:
> > 
> > > @@ -1188,15 +1193,26 @@ static inline bool
> > > tegra_dev_iommu_get_stream_id(struct device *dev, u32 *stream  #ifdef
> > > CONFIG_IOMMU_SVA  static inline void mm_pasid_init(struct mm_struct
> > > *mm)  {
> > > -	mm->pasid = IOMMU_PASID_INVALID;
> > > +	/*
> > > +	 * During dup_mm(), a new mm will be memcpy'd from an old one
> > and that makes
> > > +	 * the new mm and the old one point to a same iommu_mm
> > instance. When either
> > > +	 * one of the two mms gets released, the iommu_mm instance is
> > freed, leaving
> > > +	 * the other mm running into a use-after-free/double-free problem.
> > To avoid
> > > +	 * the problem, zeroing the iommu_mm pointer of a new mm is
> > needed here.
> > > +	 */
> > > +	mm->iommu_mm = NULL;
> > >  }
> > 
> > newlines after all the }, between functions doesn't checkpatch complain?
> Checked with checkpatch but didn't see any complaining.
> 
> > 
> > IMHO this hunk should be moved to the prior patch.
> In this patch, we switch to use mm->iommu_mm. That's why the iommu_mm initialization is put in this patch.
> 
> I think I met some problem about my mailbox when I was sending this
> new version. It didn't cc iommu@...ts.linux.dev. Should I resend
> this version again or reply to the patches with
> iommu@...ts.linux.dev cc'd?

Tidy the nits and resend a v8 if addresses got missed

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ