aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2005-10-29 21:16:32 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-30 00:40:41 -0400
commitc34d1b4d165c67b966bca4aba026443d7ff161eb (patch)
tree27ffca9daba2a6b16d29bd508faf3e68bda2aad1 /include/linux/mm.h
parentc0718806cf955d5eb51ea77bffb5b21d9bba4972 (diff)
[PATCH] mm: kill check_user_page_readable
check_user_page_readable is a problematic variant of follow_page. It's used only by oprofile's i386 and arm backtrace code, at interrupt time, to establish whether a userspace stackframe is currently readable. This is problematic, because we want to push the page_table_lock down inside follow_page, and later split it; whereas oprofile is doing a spin_trylock on it (in the i386 case, forgotten in the arm case), and needs that to pin perhaps two pages spanned by the stackframe (which might be covered by different locks when we split). I think oprofile is going about this in the wrong way: it doesn't need to know the area is readable (neither i386 nor arm uses read protection of user pages), it doesn't need to pin the memory, it should simply __copy_from_user_inatomic, and see if that succeeds or not. Sorry, but I've not got around to devising the sparse __user annotations for this. Then we can eliminate check_user_page_readable, and return to a single follow_page without the __follow_page variants. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 972e2ce8e07c..aa8de20e2e80 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -944,7 +944,6 @@ extern struct page * vmalloc_to_page(void *addr);
944extern unsigned long vmalloc_to_pfn(void *addr); 944extern unsigned long vmalloc_to_pfn(void *addr);
945extern struct page * follow_page(struct mm_struct *mm, unsigned long address, 945extern struct page * follow_page(struct mm_struct *mm, unsigned long address,
946 int write); 946 int write);
947extern int check_user_page_readable(struct mm_struct *mm, unsigned long address);
948int remap_pfn_range(struct vm_area_struct *, unsigned long, 947int remap_pfn_range(struct vm_area_struct *, unsigned long,
949 unsigned long, unsigned long, pgprot_t); 948 unsigned long, unsigned long, pgprot_t);
950 949