linux-hardened/arch/powerpc
Andrew Lewis 03d70617b8 powerpc: Prevent memory corruption due to cache invalidation of unaligned DMA buffer
On PowerPC processors with non-coherent cache architectures the DMA
subsystem calls invalidate_dcache_range() before performing a DMA read
operation.  If the address and length of the DMA buffer are not aligned
to a cache-line boundary this can result in memory outside of the DMA
buffer being invalidated in the cache.  If this memory has an
uncommitted store then the data will be lost and a subsequent read of
that address will result in an old value being returned from main memory.

Only when the DMA buffer starts on a cache-line boundary and is an exact
mutiple of the cache-line size can invalidate_dcache_range() be called,
otherwise flush_dcache_range() must be called.  flush_dcache_range()
will first flush uncommitted writes, and then invalidate the cache.

Signed-off-by: Andrew Lewis <andrew-lewis at netspace.net.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-07-01 11:28:54 +10:00
..
boot powerpc/bootwrapper: Pad .dtb by default 2008-07-01 11:28:53 +10:00
configs Merge branch 'linux-2.6' 2008-06-30 10:16:50 +10:00
kernel powerpc: Add VSX context save/restore, ptrace and signal support 2008-07-01 11:28:50 +10:00
kvm KVM: ppc: Report bad GFNs 2008-06-06 21:22:41 +03:00
lib powerpc: Prevent memory corruption due to cache invalidation of unaligned DMA buffer 2008-07-01 11:28:54 +10:00
math-emu powerpc: Add macros to access floating point registers in thread_struct. 2008-07-01 11:28:43 +10:00
mm powerpc: hash_huge_page() should get the WIMG bits from the lpte 2008-07-01 11:28:02 +10:00
oprofile Merge branch 'linux-2.6' 2008-04-14 21:11:02 +10:00
platforms powerpc: Add CONFIG_VSX config option 2008-07-01 11:28:51 +10:00
sysdev Merge branch 'next' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx 2008-06-30 09:57:05 +10:00
xmon Merge branch 'linux-2.6' 2008-06-30 10:16:50 +10:00
.gitignore [POWERPC] Add files build to .gitignore 2006-12-04 20:41:29 +11:00
Kconfig powerpc/sysdev: implement FSL GTM support 2008-06-10 10:38:50 -05:00
Kconfig.debug powerpc: Add self-tests of the feature fixup code 2008-07-01 11:28:30 +10:00
Makefile powerpc: Get rid of CROSS32{AS,LD,OBJCOPY} 2008-06-30 22:30:39 +10:00