From 239ef2f1b1c3f0c906fd28348fb80d089bfaa2a3 Mon Sep 17 00:00:00 2001 From: Anastasia Lyupa Date: Tue, 9 Apr 2013 16:31:21 +0400 Subject: [PATCH] [FIX] linux<=2.6 compiling failed Start reparing. Move follow_page_uprobe() under linux-version>=3.8. --- kprobe/dbi_kprobes_deps.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kprobe/dbi_kprobes_deps.c b/kprobe/dbi_kprobes_deps.c index d44e23b..0c5bc9d 100644 --- a/kprobe/dbi_kprobes_deps.c +++ b/kprobe/dbi_kprobes_deps.c @@ -381,6 +381,13 @@ static inline int stack_guard_page(struct vm_area_struct *vma, unsigned long add #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) +static inline struct page *follow_page_uprobe(struct vm_area_struct *vma, + unsigned long address, unsigned int foll_flags) +{ + unsigned int unused_page_mask; + return follow_page_mask(vma, address, foll_flags, &unused_page_mask); +} + long __get_user_pages_uprobe(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, unsigned long nr_pages, unsigned int gup_flags, struct page **pages, @@ -788,13 +795,6 @@ next_page: #else /* LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38) */ -static inline struct page *follow_page_uprobe(struct vm_area_struct *vma, - unsigned long address, unsigned int foll_flags) -{ - unsigned int unused_page_mask; - return follow_page_mask(vma, address, foll_flags, &unused_page_mask); -} - static int __get_user_pages_uprobe(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, int len, int flags, struct page **pages, struct vm_area_struct **vmas) -- 2.7.4