Re: [PATCH] pci-dma: Fix x86 dma_alloc_coherent to fully clear all pages returned

From: Alan Stern
Date: Sat Jan 31 2015 - 12:14:35 EST


On Fri, 30 Jan 2015, Andi Kleen wrote:

> > We don't "need" any backward compatility, why not fix the broken drivers
> > that are using memory outside of what they are asking for? That's not
> > ok no matter what, right?
>
> How would you find them all?
>
> We don't even know which place in XHCI is the culprit here.

It shouldn't be too hard to find, expecially if the fault can easily
be reproduced.

There are only about half a dozen calls to dma_alloc_coherent in the
xhci-hcd driver. Just add 64 KB to the requested memory size in each
of them. Then one-by-one (or using bisection) remove the extra size
and see which spots trigger the fault.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/