kernel-ark/arch
George G. Davis a188ad2bc7 [ARM] 3762/1: Fix ptrace cache coherency bug for ARM1136 VIPT nonaliasing Harvard caches
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>
2006-09-02 18:43:20 +01:00
..
alpha [PATCH] arch/alpha: Use ARRAY_SIZE macro 2006-07-31 13:28:38 -07:00
arm [ARM] 3762/1: Fix ptrace cache coherency bug for ARM1136 VIPT nonaliasing Harvard caches 2006-09-02 18:43:20 +01:00
arm26
cris
frv
h8300
i386 [PATCH] x86: NUMAQ Kconfig fix 2006-08-27 11:01:33 -07:00
ia64 Merge gregkh@master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 2006-08-26 13:04:23 -07:00
m32r
m68k
m68knommu
mips
parisc [PATCH] vDSO hash-style fix 2006-07-31 13:28:43 -07:00
powerpc Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-08-23 21:08:12 -07:00
ppc [PATCH] ppc32: board-specific part of fs_enet update 2006-08-19 17:44:31 -04:00
s390 [S390] kernel page table allocation. 2006-08-16 13:49:37 +02:00
sh [PATCH] sh: fix proc file removal for superh store queue module 2006-08-06 08:57:48 -07:00
sh64
sparc [SPARC]: Small smp cleanup. 2006-08-26 17:52:56 -07:00
sparc64 [SPARC64]: Explicitly print return PC when the kernel fault PC is bogus. 2006-07-24 22:33:58 -07:00
um [PATCH] vDSO hash-style fix 2006-07-31 13:28:43 -07:00
v850 [PATCH] v850: call init_page_count() instead of set_page_count() 2006-07-31 13:28:38 -07:00
x86_64 [PATCH] Change panic_on_oops message to "Fatal exception" 2006-08-14 12:54:29 -07:00
xtensa [PATCH] Change panic_on_oops message to "Fatal exception" 2006-08-14 12:54:29 -07:00