Thread (43 messages) 43 messages, 5 authors, 2025-08-14

Re: [PATCH v1 08/16] kmsan: convert kmsan_handle_dma to use physical addresses

From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2025-08-14 12:44:54
Also in: linux-block, linux-doc, linux-iommu, linux-mm, linux-nvme, linuxppc-dev, lkml, rust-for-linux, virtualization, xen-devel

On Thu, Aug 14, 2025 at 03:35:06PM +0300, Leon Romanovsky wrote:
quoted
Then check attrs here, not pfn_valid.
attrs are not available in kmsan_handle_dma(). I can add it if you prefer.
That makes more sense to the overall design. The comments I gave
before were driving at a promise to never try to touch a struct page
for ATTR_MMIO and think this should be comphrensive to never touching
a struct page even if pfnvalid.
quoted
quoted
So let's keep this patch as is.
Still need to fix the remarks you clipped, do not check PageHighMem
just call kmap_local_pfn(). All thie PageHighMem stuff is new to this
patch and should not be here, it is the wrong way to use highmem.
Sure, thanks
I am wondering if there is some reason it was written like this in the
first place. Maybe we can't even do kmap here.. So perhaps if there is
not a strong reason to change it just continue to check pagehighmem
and fail.

if (!(attrs & ATTR_MMIO) && PageHighMem(phys_to_page(phys)))
   return;

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help