On Fri, Mar 27, 2020 at 6:06 PM Christoph Hellwig <hch@xxxxxx> wrote: > > On Fri, Mar 27, 2020 at 06:03:32PM +0100, Alexander Potapenko wrote: > > > Also the page > > > doesn't have to be mapped into kernel address space, you probably > > > want to pass the page to kmsan_handle_dma and throw in a highmem > > > check there. > > > > 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? -- Alexander Potapenko Software Engineer Google Germany GmbH Erika-Mann-Straße, 33 80636 München Geschäftsführer: Paul Manicle, Halimah DeLaine Prado Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg