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] [day] [month] [year] [list]
Message-ID: <f20ffea7-357e-4f1f-b451-d09cd7401ff5@linux.intel.com>
Date: Tue, 18 Nov 2025 09:56:10 +0800
From: Baolu Lu <baolu.lu@...ux.intel.com>
To: Aashish Sharma <aashish@...hishsharma.net>,
 Vineeth Pillai <vineeth@...byteword.org>, Dmytro Maluka
 <dmaluka@...gle.com>, David Woodhouse <dwmw2@...radead.org>,
 Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>
Cc: Robin Murphy <robin.murphy@....com>, iommu@...ts.linux.dev,
 linux-kernel@...r.kernel.org, Aashish Sharma <shraash@...gle.com>
Subject: Re: [PATCH] iommu/vt-d: Remove unused code in dma_pte_free_pagetable

On 10/15/25 00:24, Aashish Sharma wrote:
> 'dma_pte_free_pagetable' is only called by
> 'switch_to_super_page' and is not intended to free the
> whole page table (0..DOMAIN_MAX_PFN(domain->gaw)).
> 
> Hence remove the code that checks for this and frees the page
> table pointed by 'domain->pgd'.
> 
> Signed-off-by: Aashish Sharma (Google)<aashish@...hishsharma.net>
> ---
>   drivers/iommu/intel/iommu.c | 6 ------
>   1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
> index e236c7ec221f..3b3ad7b0c0ce 100644
> --- a/drivers/iommu/intel/iommu.c
> +++ b/drivers/iommu/intel/iommu.c
> @@ -883,12 +883,6 @@ static void dma_pte_free_pagetable(struct dmar_domain *domain,
>   	/* We don't need lock here; nobody else touches the iova range */
>   	dma_pte_free_level(domain, agaw_to_level(domain->agaw), retain_level,
>   			   domain->pgd, 0, start_pfn, last_pfn);
> -
> -	/* free pgd */
> -	if (start_pfn == 0 && last_pfn == DOMAIN_MAX_PFN(domain->gaw)) {
> -		iommu_free_pages(domain->pgd);
> -		domain->pgd = NULL;
> -	}
>   }

Thank you for the patch. The dma_pte_free_pagetable() helper has been
removed in the iommu/next branch.

>   
>   /* When a page at a given level is being unlinked from its parent, we don't

Thanks,
baolu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ