a188ad2bc7
Patch from George G. Davis Resolve ARM1136 VIPT non-aliasing cache coherency issues observed when using ptrace to set breakpoints and cleanup copy_{to,from}_user_page() while we're here as requested by Russell King because "it's also far too heavy on non-v6 CPUs". NOTES: 1. Only access_process_vm() calls copy_{to,from}_user_page(). 2. access_process_vm() calls get_user_pages() to pin down the "page". 3. get_user_pages() calls flush_dcache_page(page) which ensures cache coherency between kernel and userspace mappings of "page". However flush_dcache_page(page) may not invalidate I-Cache over this range for all cases, specifically, I-Cache is not invalidated for the VIPT non-aliasing case. So memory is consistent between kernel and user space mappings of "page" but I-Cache may still be hot over this range. IOW, we don't have to worry about flush_cache_page() before memcpy(). 4. Now, for the copy_to_user_page() case, after memcpy(), we must flush the caches so memory is consistent with kernel cache entries and invalidate the I-Cache if this mm region is executable. We don't need to do anything after memcpy() for the copy_from_user_page() case since kernel cache entries will be invalidated via the same process above if we access "page" again. The flush_ptrace_access() function (borrowed from SPARC64 implementation) is added to handle cache flushing after memcpy() for the copy_to_user_page() case. Signed-off-by: George G. Davis <gdavis@mvista.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> |
||
---|---|---|
.. | ||
abort-ev4.S | ||
abort-ev4t.S | ||
abort-ev5t.S | ||
abort-ev5tj.S | ||
abort-ev6.S | ||
abort-lv4t.S | ||
abort-macro.S | ||
alignment.c | ||
cache-v3.S | ||
cache-v4.S | ||
cache-v4wb.S | ||
cache-v4wt.S | ||
cache-v6.S | ||
consistent.c | ||
copypage-v3.S | ||
copypage-v4mc.c | ||
copypage-v4wb.S | ||
copypage-v4wt.S | ||
copypage-v6.c | ||
copypage-xsc3.S | ||
copypage-xscale.c | ||
discontig.c | ||
extable.c | ||
fault-armv.c | ||
fault.c | ||
fault.h | ||
flush.c | ||
init.c | ||
iomap.c | ||
ioremap.c | ||
Kconfig | ||
Makefile | ||
mm-armv.c | ||
mmap.c | ||
mmu.c | ||
nommu.c | ||
proc-arm6_7.S | ||
proc-arm720.S | ||
proc-arm920.S | ||
proc-arm922.S | ||
proc-arm925.S | ||
proc-arm926.S | ||
proc-arm1020.S | ||
proc-arm1020e.S | ||
proc-arm1022.S | ||
proc-arm1026.S | ||
proc-macros.S | ||
proc-sa110.S | ||
proc-sa1100.S | ||
proc-syms.c | ||
proc-v6.S | ||
proc-xsc3.S | ||
proc-xscale.S | ||
tlb-v3.S | ||
tlb-v4.S | ||
tlb-v4wb.S | ||
tlb-v4wbi.S | ||
tlb-v6.S |