Re: [PATCH 03/16] dma-debug: add hash functions fordma_debug_entries

From: David Woodhouse
Date: Wed Jan 14 2009 - 12:49:13 EST


On Wed, 2009-01-14 at 09:39 -0800, Andrew Morton wrote:
> > this code checks the DMA usage of ~1 million lines of kernel code - all
> > the DMA using drivers. I think Joerg's feature is hugely relevant as DMA
> > scribbles are one of the hardest to debug kernel bugs: they can end up in
> > permanent data corruption or other hard to find bugs. In fact i think his
> > patchset is rather simple and even having 10 times as much debug code
> > would pay for its existence in the long run.
> >
>
> Have we previously found bugs by other means which this facility would
> have detected? I don't recall any...

Yes. We've found network driver bugs which only showed up when an IOMMU
has been active -- and were painful to diagnose because they involved
DMA going wrong. It happens when drivers make mistakes with the DMA
mapping APIs.

With this debug facility, we can find such problems on _any_ hardware,
and get a sane report about what's wrong.

--
David Woodhouse Open Source Technology Centre
David.Woodhouse@xxxxxxxxx Intel Corporation

--
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/