diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-02-09 13:59:39 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-10-29 20:30:29 +0200 |
commit | 26852d5cdb2bac01f2a48b815194a045e8a8e300 (patch) | |
tree | 2a70644d2ddd04d24b92dc272b87bd235a19f5e7 | |
parent | 25Kf is also physically indexed. (diff) | |
download | linux-26852d5cdb2bac01f2a48b815194a045e8a8e300.tar.xz linux-26852d5cdb2bac01f2a48b815194a045e8a8e300.zip |
Fix ptrace aliasing issue in copy_from_user_page / copy_to_user_page.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | include/asm-mips/cacheflush.h | 8 |
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); #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ do { \ + if (cpu_has_dc_aliases) \ + flush_cache_page(vma, vaddr); \ memcpy(dst, (void *) src, len); \ flush_icache_page(vma, page); \ } while (0) #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ - memcpy(dst, src, len) +do { \ + if (cpu_has_dc_aliases) \ + flush_cache_page(vma, vaddr); \ + memcpy(dst, src, len); \ +} while (0) extern void (*flush_cache_sigtramp)(unsigned long addr); extern void (*flush_icache_all)(void); |