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>] [day] [month] [year] [list]
Message-ID: <20251014162408.2217563-1-aashish@aashishsharma.net>
Date: Tue, 14 Oct 2025 09:24:08 -0700
From: Aashish Sharma <aashish@...hishsharma.net>
To: Vineeth Pillai <vineeth@...byteword.org>,
	Lu Baolu <baolu.lu@...ux.intel.com>,
	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>,
	Aashish Sharma <aashish@...hishsharma.net>
Subject: [PATCH] iommu/vt-d: Remove unused code in dma_pte_free_pagetable

'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;
-	}
 }
 
 /* When a page at a given level is being unlinked from its parent, we don't
-- 
2.51.0.760.g7b8bcc2412-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ