Cache incoherency may corrupt code pages read from filesystems on USB or PIO mass storage

Bug #523293 reported by Dave Martin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-fsl-imx51 (Ubuntu)
Invalid
Undecided
Bryan Wu
linux-mvl-dove (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

May affect all current ARM kernels.

Impact: random sporadic code execution errors in userspace when using certain types of mass storage for the filesystem.

These discussions have just been brought to to my attention --- mass storage drivers which do not use DMA write the data into the D-cache, but for code pages, the necessary requirements for propagating the code to the I-cache are not met. This may show up as unpredictable code execution errors where the contents of the I-cache are stale and do not match the page content the kernel fetched from the filesystem.

Possibly this is the cause of https://bugs.launchpad.net/bugs/499881 (usb storage with ext4 does not work in lucid on imx51 hardware) but from the symptoms of that bug, maybe not.

See:

  * http://comments.gmane.org/gmane.linux.usb.general/27072 (USB mass storage and ARM cache coherency)

        (proposes a fix for USB-based filesystems)

  * http://comments.gmane.org/gmane.linux.ide/44847 (ata: call flush_dcache_page() around PIO data transfers in libata-sff.c)

        (proposes a fix for the PIO-based libata drivers)

Bryan Wu (cooloney)
Changed in linux-fsl-imx51 (Ubuntu):
assignee: nobody → Bryan Wu (cooloney)
Revision history for this message
Bryan Wu (cooloney) wrote :

I just went through the email thread and found that this issue may affect all the ARM kernel. But the patches are still under discussion. I will keep eyes on it and maybe backport them when it is ready.

For the USB fixing, it adds some flush_dcache_page operation in ISP1760 HCD. We might need similar solution in EHCI HCD for IMX51.

For the libata fixing, patch is not finalized and they agreed to create some PIO mapping API similar with DMA mapping API. It will take some time to review and merge

-Bryan

Changed in linux-fsl-imx51 (Ubuntu):
status: New → Incomplete
tags: added: kernel-series-unknown
Revision history for this message
Tobin Davis (gruemaster) wrote :

These bugs are being closed as invalid, as they reference older systems that are in maintenance mode, and they do not specify kernel versions. There is also not enough data to reproduce any issues with or debug with. If new information is available, please reopen the bug or file a new one. Thanks.

Changed in linux-mvl-dove (Ubuntu):
status: New → Invalid
Changed in linux-fsl-imx51 (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Dave Martin (dave-martin-arm) wrote :

It seems that a number of upstream changes in linux-2.6.37 fix this issue. So I guess it's historical.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.