Re: [PATCH v5 34/38] kmsan: dma: unpoison memory mapped by dma_direct_map_page()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 27, 2020 at 07:46:08PM +0100, Alexander Potapenko wrote:
> > > Do you mean comparing the address to TASK_SIZE, or is there a more
> > > portable way to check that?
> >
> > !PageHighMem(page) implies the page has a kernel direct mapping.
> 
> I tried adding this check and started seeing false positives because
> the virtio_ring driver actually uses highmem pages for DMA, and data
> from those pages is later copied to the kernel.
> Guess it's easier to just allow handling highmem pages? What problems
> do you anticipate?

For PageHighMem(page), page_address(page) is not actually valid, so І'm
not sure how your code in this patch even worked at all.  Note that
all drivers (well, except for a few buggy legacy ones with workarounds)
can DMA from/to highmem.





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux