android_kernel_xiaomi_sm8350/arch/arm
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
..
boot Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2006-07-02 15:04:12 -07:00
common [ARM] 3741/1: remove sa1111.c build warning on non-sa1100 systems 2006-08-27 13:09:14 +01:00
configs [ARM] 3763/1: add both rtcs to csb337 defconfig 2006-08-31 15:26:35 +01:00
kernel [ARM] Add Integrator support for glibc outb() and friends 2006-08-28 12:47:05 +01:00
lib Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
mach-aaec2000 [PATCH] ARM: fixup irqflags breakage after ARM genirq merge 2006-07-02 17:29:22 -07:00
mach-at91rm9200 [ARM] 3739/1: genirq updates: irq_chip, add and use irq_chip.name 2006-08-01 22:26:25 +01:00
mach-clps711x [PATCH] ARM: fixup irqflags breakage after ARM genirq merge 2006-07-02 17:29:22 -07:00
mach-clps7500 [PATCH] ARM: fixup irqflags breakage after ARM genirq merge 2006-07-02 17:29:22 -07:00
mach-ebsa110 [PATCH] ARM: fixup irqflags breakage after ARM genirq merge 2006-07-02 17:29:22 -07:00
mach-ep93xx [PATCH] ARM: fixup irqflags breakage after ARM genirq merge 2006-07-02 17:29:22 -07:00
mach-footbridge [ARM] Move prototype for register_isa_ports to asm/io.h 2006-08-28 12:45:16 +01:00
mach-h720x [PATCH] ARM: fixup irqflags breakage after ARM genirq merge 2006-07-02 17:29:22 -07:00
mach-imx [ARM] 3739/1: genirq updates: irq_chip, add and use irq_chip.name 2006-08-01 22:26:25 +01:00
mach-integrator [ARM] Add Integrator support for glibc outb() and friends 2006-08-28 12:47:05 +01:00
mach-iop3xx [ARM] 3739/1: genirq updates: irq_chip, add and use irq_chip.name 2006-08-01 22:26:25 +01:00
mach-ixp4xx [ARM] Fix pci export warnings 2006-08-06 11:00:45 +01:00
mach-ixp23xx [PATCH] ARM: fixup irqflags breakage after ARM genirq merge 2006-07-02 17:29:22 -07:00
mach-ixp2000 [PATCH] ARM: fixup irqflags breakage after ARM genirq merge 2006-07-02 17:29:22 -07:00
mach-l7200 [ARM] 3684/1: ARM: Convert l7200 to generic irq handling 2006-07-01 22:32:19 +01:00
mach-lh7a40x [ARM] 3739/1: genirq updates: irq_chip, add and use irq_chip.name 2006-08-01 22:26:25 +01:00
mach-netx [PATCH] ARM: fixup irqflags breakage after ARM genirq merge 2006-07-02 17:29:22 -07:00
mach-omap1 [ARM] 3739/1: genirq updates: irq_chip, add and use irq_chip.name 2006-08-01 22:26:25 +01:00
mach-omap2 [ARM] 3739/1: genirq updates: irq_chip, add and use irq_chip.name 2006-08-01 22:26:25 +01:00
mach-pnx4008 [ARM] 3709/1: pnx4008: convert to generic irq subsystem 2006-07-05 14:47:20 +01:00
mach-pxa [ARM] 3760/1: This patch adds timeouts while working with SSP registers. Such timeouts were en 2006-08-27 12:54:56 +01:00
mach-realview [PATCH] ARM: fixup irqflags breakage after ARM genirq merge 2006-07-02 17:29:22 -07:00
mach-rpc [PATCH] ARM: fixup irqflags breakage after ARM genirq merge 2006-07-02 17:29:22 -07:00
mach-s3c2410 [ARM] 3764/1: S3C24XX: change type naming to kernel style 2006-08-31 15:26:37 +01:00
mach-sa1100 [ARM] 3760/1: This patch adds timeouts while working with SSP registers. Such timeouts were en 2006-08-27 12:54:56 +01:00
mach-shark [ARM] 3739/1: genirq updates: irq_chip, add and use irq_chip.name 2006-08-01 22:26:25 +01:00
mach-versatile [ARM] 3752/1: fix versatile flash resource map 2006-08-13 14:17:12 +01:00
mm [ARM] 3762/1: Fix ptrace cache coherency bug for ARM1136 VIPT nonaliasing Harvard caches 2006-09-02 18:43:20 +01:00
nwfpe [ARM] 3729/3: EABI padding rules necessitate the packed attribute of floatx80 2006-07-13 13:04:24 +01:00
oprofile [PATCH] ARM: fixup irqflags breakage after ARM genirq merge 2006-07-02 17:29:22 -07:00
plat-omap [ARM] 3739/1: genirq updates: irq_chip, add and use irq_chip.name 2006-08-01 22:26:25 +01:00
tools [ARM] Update mach-types 2006-06-26 22:50:21 +01:00
vfp [ARM] 3750/3: Fix double VFP emulation for EABI kernels 2006-08-30 15:06:39 +01:00
Kconfig Merge branch 'genirq' of master.kernel.org:/home/rmk/linux-2.6-arm 2006-07-02 15:07:45 -07:00
Kconfig-nommu
Kconfig.debug [ARM] Trivial typo fixes 2006-06-04 21:22:11 +01:00
Makefile [ARM] 3761/1: fix armv4t breakage after adding thumb interworking to userspace helpers 2006-08-28 12:51:20 +01:00