On Sat, 2006-01-14 at 00:24 +0900, Tejun Heo wrote:
> This patchset tries to fix data corruption bug caused by not handling
> cache coherency during block PIO. This patch implements
> blk_kmap/unmap helpers which take extra @dir argument and perform
> appropriate coherency actions. These are to block PIO what dma_map/
> unmap are to block DMA transfers.
>
> IDE, libata, SCSI, rd and md are converted. Still left are nbd, loop
> and pktcddvd. If I missed something, please let me know.
>
> Russell, can you please test whether this fixes the bug on arm? If
> this fixes the bug and people agree with the approach, I'll follow up
> with patches for yet unconverted drivers and documentation update.
Actually, this doesn't look to be the correct thing to do. The
dma_map/unmap don't make the data coherent with respect to the user
space, only with respect to the kernel space. I've never liked this
(and indeed I wrote an OLS paper in 2004 trying to explain how we could
fix it) but that's our current model.
Our classic path for data on machines is that the driver makes the
kernel coherent and then whatever's transferring from the page cache to
the user makes user space coherent. It sounds, therefore, like
whatever's broken (what is the problem, by the way?) is broken in the
second half (page cache to user) not in the first half (driver to
kernel).
James
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]