android_kernel_xiaomi_sm8350/arch/arm/mm
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
..
abort-ev4.S
abort-ev4t.S
abort-ev5t.S
abort-ev5tj.S
abort-ev6.S
abort-lv4t.S
abort-macro.S
alignment.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
cache-v3.S
cache-v4.S
cache-v4wb.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
cache-v4wt.S
cache-v6.S
consistent.c [ARM] 3439/2: xsc3: add I/O coherency support 2006-04-02 00:07:39 +01:00
copypage-v3.S [ARM] Remove LOADREGS macro 2006-06-25 11:23:45 +01:00
copypage-v4mc.c
copypage-v4wb.S
copypage-v4wt.S
copypage-v6.c
copypage-xsc3.S [ARM] 3377/2: add support for intel xsc3 core 2006-03-28 21:00:40 +01:00
copypage-xscale.c
discontig.c
extable.c
fault-armv.c
fault.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
fault.h
flush.c [ARM] 3762/1: Fix ptrace cache coherency bug for ARM1136 VIPT nonaliasing Harvard caches 2006-09-02 18:43:20 +01:00
init.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
iomap.c [ARM] nommu: add stubs for ioremap and friends 2006-06-28 17:59:48 +01:00
ioremap.c [ARM] 3734/1: Fix the unused variable warning in __iounmap() 2006-07-29 08:29:30 +01:00
Kconfig [ARM] 3761/1: fix armv4t breakage after adding thumb interworking to userspace helpers 2006-08-28 12:51:20 +01:00
Makefile [ARM] nommu: remove fault-armv, mmap and mm-armv files from nommu build 2006-06-28 17:59:52 +01:00
mm-armv.c Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2006-07-02 15:04:12 -07:00
mmap.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
mmu.c
nommu.c [ARM] nommu: export flush_dcache_page() 2006-06-28 17:59:53 +01:00
proc-arm6_7.S [ARM] Set bit 4 on section mappings correctly depending on CPU 2006-06-29 18:24:21 +01:00
proc-arm720.S [PATCH] ARM: Fixup missing includes in arch/arm/mm/proc-<cputype>.S 2006-07-02 17:29:22 -07:00
proc-arm920.S Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2006-07-02 15:04:12 -07:00
proc-arm922.S Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2006-07-02 15:04:12 -07:00
proc-arm925.S [ARM] Fix bad asm instruction in proc-arm925.S 2006-07-03 12:44:30 +01:00
proc-arm926.S Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2006-07-02 15:04:12 -07:00
proc-arm1020.S [ARM] More missing proc-macros.S includes 2006-07-03 12:36:07 +01:00
proc-arm1020e.S [ARM] More missing proc-macros.S includes 2006-07-03 12:36:07 +01:00
proc-arm1022.S [ARM] More missing proc-macros.S includes 2006-07-03 12:36:07 +01:00
proc-arm1026.S [ARM] More missing proc-macros.S includes 2006-07-03 12:36:07 +01:00
proc-macros.S [ARM] nommu: provide a way for correct control register value selection 2006-06-29 15:09:57 +01:00
proc-sa110.S [PATCH] ARM: Fixup missing includes in arch/arm/mm/proc-<cputype>.S 2006-07-02 17:29:22 -07:00
proc-sa1100.S [PATCH] ARM: Fixup missing includes in arch/arm/mm/proc-<cputype>.S 2006-07-02 17:29:22 -07:00
proc-syms.c [ARM] 3737/1: Export ARM copy/clear_user_page symbols 2006-07-29 08:29:27 +01:00
proc-v6.S Merge nommu branch 2006-07-01 20:43:57 +01:00
proc-xsc3.S Merge nommu branch 2006-07-01 20:43:57 +01:00
proc-xscale.S [ARM] 3736/1: xscale: don't mis-report 80219 as an iop32x 2006-07-29 08:29:26 +01:00
tlb-v3.S
tlb-v4.S
tlb-v4wb.S
tlb-v4wbi.S
tlb-v6.S