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: <aHGKdEr8CQwHsuB0@Asurada-Nvidia>
Date: Fri, 11 Jul 2025 15:04:36 -0700
From: Nicolin Chen <nicolinc@...dia.com>
To: Jason Gunthorpe <jgg@...dia.com>
CC: Xu Yilun <yilun.xu@...ux.intel.com>, <kevin.tian@...el.com>,
	<will@...nel.org>, <aneesh.kumar@...nel.org>, <iommu@...ts.linux.dev>,
	<linux-kernel@...r.kernel.org>, <joro@...tes.org>, <robin.murphy@....com>,
	<shuah@...nel.org>, <aik@....com>, <dan.j.williams@...el.com>,
	<baolu.lu@...ux.intel.com>, <yilun.xu@...el.com>
Subject: Re: [PATCH v4 2/7] iommufd: Add iommufd_object_tombstone_user()
 helper

On Fri, Jul 11, 2025 at 06:33:23PM -0300, Jason Gunthorpe wrote:
> On Fri, Jul 11, 2025 at 11:02:53PM +0800, Xu Yilun wrote:
> > > let's write something like this (correcting typos too):
> > > 
> > > 		/*
> > > 		 * We can't use xa_empty(), as a tombstone (NULLed entry) would
> >                                                             ^
> > > 		 * prevent it returning true, unlike xa_for_each() ignoring the
> > > 		 * NULLed entries. So use an empty flag instead of xa_empty() to
> >                    ^
> > s/NULLed/zeroed, are they?
> 
> Maybe:
> 
>  We can't use xa_empty() to end the loop as the tombstones are stored
>  as XA_ZERO_ENTRY in the xarray. However xa_for_each() automatically
>  converts them to NULL and skips them causing xa_empty() to be kept
>  false. Thus once xa_for_each() finds no further !NULL entries the
>  loop is done.
> 
> ?

+1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ