Re: [GIT PULL] AMD IOMMU updates for 2.6.28-rc5

From: Ingo Molnar
Date: Wed Nov 19 2008 - 04:36:46 EST



* Joerg Roedel <joro@xxxxxxxxxx> wrote:

> We can't test all drivers for those bugs until 2.6.28 will be
> released. And these bugs can corrupt data, for example when a driver
> frees dma addresses allocated by another driver and these addresses
> are then reallocated.
>
> The only way to protect the drivers from each other is to isolate
> them in different protection domains. The AMD IOMMU driver prints a
> WARN_ON() if a driver frees dma addresses not yet mapped. This
> triggered with the bnx2 and the ixgbe driver.
>
> And the data corruption is real, it eat the root-fs of my testbox
> one time.

a WARN_ON() can be acted upon much easier than silent/spurious data
corruption. So printing a WARN_ON() will result in drivers being fixed
a lot faster (and with a lot less debugging needed) than if we were
intentionally letting DMA corruption happen. The WARN_ON() will be
routed to kerneloops.org on the major distros, etc. etc.

> I agree that we need to fix the drivers. I plan to implement some
> debug code which allows driver developers to detect those bugs even
> if they have no IOMMU in the system.

That would be _really_ nice to have.

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