Skip to content

Commit

Permalink
Fix ptrace aliasing issue in copy_from_user_page / copy_to_user_page.
Browse files Browse the repository at this point in the history
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Ralf Baechle committed Oct 29, 2005
1 parent 505403b commit 26852d5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/asm-mips/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 26852d5

Please sign in to comment.