linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] iommu: debug-pagealloc: Remove pfn_valid() usage
@ 2026-01-19 14:22 Mostafa Saleh
  2026-01-19 14:22 ` [PATCH 1/2] mm/page_ext: Add page_ext_get_phys() Mostafa Saleh
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Mostafa Saleh @ 2026-01-19 14:22 UTC (permalink / raw)
  To: linux-mm, iommu, linux-kernel, linux-doc
  Cc: corbet, joro, will, robin.murphy, akpm, vbabka, surenb, mhocko,
	jackmanb, hannes, ziy, david, lorenzo.stoakes, Liam.Howlett,
	rppt, xiaqinxin, baolu.lu, rdunlap, Mostafa Saleh

This is a small fix for the new config IOMMU_DEBUG_PAGEALLOC based
on the discussion:
https://lore.kernel.org/linux-iommu/CAFgf54pBAUm3ao-UJksiuGKtvv4wzRyFq_uKwLe0H1ettO4DLQ@mail.gmail.com/

Where it was concluded that pfn_valid() is not enough to validate
physical addresses before access to page_ext.

The first patch introduces a new function in page_ext that takes a
physical address as an argument, and the second patch uses it instead
of calling pfn_valid() and phys_to_page()

Benchmarks with the new implementation can be found in:
https://lore.kernel.org/linux-iommu/20260114164322.787125-1-smostafa@google.com/

This series applies to iommu/core tree.

Mostafa Saleh (2):
  mm/page_ext: Add page_ext_get_phys()
  iommu: debug-pagealloc: Use page_ext_get_phys()

 drivers/iommu/iommu-debug-pagealloc.c | 31 ++++++++++++---------------
 include/linux/page_ext.h              |  6 ++++++
 mm/page_ext.c                         | 23 ++++++++++++++++++++
 3 files changed, 43 insertions(+), 17 deletions(-)

-- 
2.52.0.457.g6b5491de43-goog



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-01-19 15:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-19 14:22 [PATCH 0/2] iommu: debug-pagealloc: Remove pfn_valid() usage Mostafa Saleh
2026-01-19 14:22 ` [PATCH 1/2] mm/page_ext: Add page_ext_get_phys() Mostafa Saleh
2026-01-19 15:48   ` Jörg Rödel
2026-01-19 15:55     ` Mostafa Saleh
2026-01-19 14:22 ` [PATCH 2/2] iommu: debug-pagealloc: Use page_ext_get_phys() Mostafa Saleh
2026-01-19 14:26 ` [PATCH 0/2] iommu: debug-pagealloc: Remove pfn_valid() usage David Hildenbrand (Red Hat)
2026-01-19 15:09   ` Mostafa Saleh
2026-01-19 15:16     ` David Hildenbrand (Red Hat)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox