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: <fc6632e7-f0eb-437c-b687-c31c019f3d1f@linux.intel.com>
Date: Thu, 4 Dec 2025 10:25:26 +0800
From: Baolu Lu <baolu.lu@...ux.intel.com>
To: Samiullah Khawaja <skhawaja@...gle.com>,
 David Woodhouse <dwmw2@...radead.org>, Joerg Roedel <joro@...tes.org>,
 Will Deacon <will@...nel.org>, Pasha Tatashin <pasha.tatashin@...een.com>,
 Jason Gunthorpe <jgg@...pe.ca>, iommu@...ts.linux.dev
Cc: Robin Murphy <robin.murphy@....com>, Pratyush Yadav
 <pratyush@...nel.org>, Kevin Tian <kevin.tian@...el.com>,
 Alex Williamson <alex@...zbot.org>, linux-kernel@...r.kernel.org,
 Saeed Mahameed <saeedm@...dia.com>,
 Adithya Jayachandran <ajayachandra@...dia.com>,
 Parav Pandit <parav@...dia.com>, Leon Romanovsky <leonro@...dia.com>,
 William Tu <witu@...dia.com>, Vipin Sharma <vipinsh@...gle.com>,
 dmatlack@...gle.com, YiFei Zhu <zhuyifei@...gle.com>,
 Chris Li <chrisl@...nel.org>, praan@...gle.com
Subject: Re: [RFC PATCH v2 11/32] iommu/pages: Add APIs to
 preserve/unpreserve/restore iommu pages

On 12/3/25 07:02, Samiullah Khawaja wrote:
> +int iommu_preserve_pages(struct iommu_pages_list *list)
> +{
> +	struct ioptdesc *iopt;
> +	int count = 0;
> +	int ret;
> +
> +	list_for_each_entry(iopt, &list->pages, iopt_freelist_elm) {
> +		ret = kho_preserve_folio(ioptdesc_folio(iopt));
> +		if (ret) {
> +			iommu_unpreserve_pages(list, count);
> +			return ret;
> +		}
> +
> +		++count;
> +	}
> +
> +	return 0;
> +}
> +EXPORT_SYMBOL_GPL(iommu_preserve_pages);

What is the purpose of "count"?

Thanks,
baolu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ