aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/cacheflush.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-02-09 07:59:39 -0500
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:30:29 -0400
commit26852d5cdb2bac01f2a48b815194a045e8a8e300 (patch)
tree2a70644d2ddd04d24b92dc272b87bd235a19f5e7 /include/asm-mips/cacheflush.h
parent505403b6a02aefc47c038acf56b719497b720012 (diff)
Fix ptrace aliasing issue in copy_from_user_page / copy_to_user_page.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips/cacheflush.h')
-rw-r--r--include/asm-mips/cacheflush.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/asm-mips/cacheflush.h b/include/asm-mips/cacheflush.h
index 635f1bfb403e..3780c9f9354a 100644
--- a/include/asm-mips/cacheflush.h
+++ b/include/asm-mips/cacheflush.h
@@ -55,11 +55,17 @@ extern void (*flush_icache_range)(unsigned long start, unsigned long end);
55 55
56#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ 56#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
57do { \ 57do { \
58 if (cpu_has_dc_aliases) \
59 flush_cache_page(vma, vaddr); \
58 memcpy(dst, (void *) src, len); \ 60 memcpy(dst, (void *) src, len); \
59 flush_icache_page(vma, page); \ 61 flush_icache_page(vma, page); \
60} while (0) 62} while (0)
61#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ 63#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
62 memcpy(dst, src, len) 64do { \
65 if (cpu_has_dc_aliases) \
66 flush_cache_page(vma, vaddr); \
67 memcpy(dst, src, len); \
68} while (0)
63 69
64extern void (*flush_cache_sigtramp)(unsigned long addr); 70extern void (*flush_cache_sigtramp)(unsigned long addr);
65extern void (*flush_icache_all)(void); 71extern void (*flush_icache_all)(void);