Re: [PATCH RFC] iommu/dma: Validate page before accessing P2PDMA state
From: Jason Gunthorpe
Date: Fri Feb 27 2026 - 09:25:27 EST
On Fri, Feb 27, 2026 at 02:08:42PM +0000, Pranjal Shrivastava wrote:
> The question is, are we sure to use scatterlists to represent non-paged
> memory?
This is absolutely illegal and a driver bug to put non-struct page
memory into a scatter list. It was never an acceptable "work
around". What driver is doing this??
If you want to improve robustness add some pfn_valid/etc checks under
the CONFING DMA DEBUG and throw warns for these mistakes.
Jason