extern struct kprobe * per_cpu__current_kprobe;
extern struct kprobe * current_kprobe;
-DECLARE_MOD_FUNC_DEP(module_alloc, void *, unsigned long size);
-DECLARE_MOD_FUNC_DEP(module_free, void, struct module *mod, void *module_region);
-DECLARE_MOD_FUNC_DEP(fixup_exception, int, struct pt_regs * regs);
-DECLARE_MOD_FUNC_DEP(freeze_processes, int, void);
-DECLARE_MOD_FUNC_DEP(thaw_processes, void, void);
+static int (*swap_fixup_exception)(struct pt_regs * regs);
+static void *(*swap_text_poke)(void *addr, const void *opcode, size_t len);
+static void (*swap_show_registers)(struct pt_regs * regs);
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26))
-DECLARE_MOD_FUNC_DEP(text_poke, void, void *addr, unsigned char *opcode, int len);
-#else
-DECLARE_MOD_FUNC_DEP(text_poke, void *, void *addr, const void *opcode, size_t len);
-#endif
-DECLARE_MOD_FUNC_DEP(show_registers, void, struct pt_regs * regs);
-
-DECLARE_MOD_DEP_WRAPPER (module_alloc, void *, unsigned long size)
-IMP_MOD_DEP_WRAPPER (module_alloc, size)
-
-DECLARE_MOD_DEP_WRAPPER (module_free, void, struct module *mod, void *module_region)
-IMP_MOD_DEP_WRAPPER (module_free, mod, module_region)
-
-DECLARE_MOD_DEP_WRAPPER (fixup_exception, int, struct pt_regs * regs)
-IMP_MOD_DEP_WRAPPER (fixup_exception, regs)
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26))
-DECLARE_MOD_DEP_WRAPPER(text_poke, \
- void, void *addr, unsigned char *opcode, int len)
-#else
-DECLARE_MOD_DEP_WRAPPER(text_poke, \
- void *, void *addr, const void *opcode, size_t len)
-#endif
-IMP_MOD_DEP_WRAPPER(text_poke, addr, opcode, len)
-
-DECLARE_MOD_DEP_WRAPPER(show_registers, void, struct pt_regs * regs)
-IMP_MOD_DEP_WRAPPER(show_registers, regs)
#define stack_addr(regs) ((unsigned long *)kernel_stack_pointer(regs))
* In case the user-specified fault handler returned
* zero, try to fix up.
*/
- if (fixup_exception (regs))
+ if (swap_fixup_exception(regs))
return 1;
/*
printk("current esp %p does not match saved esp %p\n",
stack_addr(regs), kcb->jprobe_saved_esp);
printk ("Saved registers for jprobe %p\n", jp);
- show_registers (saved_regs);
+ swap_show_registers(saved_regs);
printk ("Current registers\n");
- show_registers (regs);
+ swap_show_registers(regs);
panic("BUG");
//BUG ();
}
void arch_arm_kprobe (struct kprobe *p)
{
- text_poke (p->addr, ((unsigned char[])
- {BREAKPOINT_INSTRUCTION}), 1);
+ swap_text_poke(p->addr,
+ ((unsigned char[]){BREAKPOINT_INSTRUCTION}), 1);
}
void arch_disarm_kprobe (struct kprobe *p)
{
- text_poke (p->addr, &p->opcode, 1);
+ swap_text_poke(p->addr, &p->opcode, 1);
}
static __used void *trampoline_probe_handler_x86(struct pt_regs *regs)
int arch_init_module_deps()
{
- INIT_MOD_DEP_VAR(module_alloc, module_alloc);
- INIT_MOD_DEP_VAR(module_free, module_free);
- INIT_MOD_DEP_VAR(fixup_exception, fixup_exception);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23)
-# error this kernel version has no text_poke function which is necessaryf for x86 ach!!!
-#else
- INIT_MOD_DEP_VAR(text_poke, text_poke);
-#endif
- INIT_MOD_DEP_VAR(show_registers, show_registers);
-#if defined(CONFIG_PREEMPT) && defined(CONFIG_PM)
- INIT_MOD_DEP_VAR(freeze_processes, freeze_processes);
- INIT_MOD_DEP_VAR(thaw_processes, thaw_processes);
-#endif
+ const char *sym;
+
+ sym = "fixup_exception";
+ swap_fixup_exception = (void *)swap_ksyms(sym);
+ if (swap_fixup_exception == NULL)
+ goto not_found;
+
+ sym = "text_poke";
+ swap_text_poke = (void *)swap_ksyms(sym);
+ if (swap_text_poke == NULL)
+ goto not_found;
+
+ sym = "show_registers";
+ swap_show_registers = (void *)swap_ksyms(sym);
+ if (swap_show_registers == NULL)
+ goto not_found;
return 0;
+
+not_found:
+ printk("ERROR: symbol %s(...) not found\n", sym);
+ return -ESRCH;
}
int arch_init_kprobes(void)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
DECLARE_MOD_FUNC_DEP(do_mmap_pgoff, unsigned long, struct file *file, unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long pgoff, unsigned long *populate);
-DECLARE_MOD_DEP_WRAPPER(do_mmap_pgoff, unsigned long, struct file *file, unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long pgoff, unsigned long *populate)
+DECLARE_MOD_DEP_WRAPPER(swap_do_mmap_pgoff,
+ unsigned long,
+ struct file *file, unsigned long addr,
+ unsigned long len, unsigned long prot,
+ unsigned long flags, unsigned long pgoff,
+ unsigned long *populate)
IMP_MOD_DEP_WRAPPER(do_mmap_pgoff, file, addr, len, prot, flags, pgoff, populate)
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) */
DECLARE_MOD_FUNC_DEP(do_mmap_pgoff, unsigned long, struct file *file, unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long pgoff);
-DECLARE_MOD_DEP_WRAPPER(do_mmap_pgoff, unsigned long, struct file *file, unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long pgoff)
+DECLARE_MOD_DEP_WRAPPER(swap_do_mmap_pgoff,
+ unsigned long,
+ struct file *file, unsigned long addr,
+ unsigned long len, unsigned long prot,
+ unsigned long flags, unsigned long pgoff)
IMP_MOD_DEP_WRAPPER(do_mmap_pgoff, file, addr, len, prot, flags, pgoff)
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0)
-EXPORT_SYMBOL_GPL(do_mmap_pgoff);
+EXPORT_SYMBOL_GPL(swap_do_mmap_pgoff);
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) */
/* copy_to_user_page */
#ifndef copy_to_user_page
static DECLARE_MOD_FUNC_DEP(copy_to_user_page, void, struct vm_area_struct *vma, struct page *page, unsigned long uaddr, void *dst, const void *src, unsigned long len);
-DECLARE_MOD_DEP_WRAPPER(copy_to_user_page, void, struct vm_area_struct *vma, struct page *page, unsigned long uaddr, void *dst, const void *src, unsigned long len)
+DECLARE_MOD_DEP_WRAPPER(swap_copy_to_user_page,
+ void,
+ struct vm_area_struct *vma, struct page *page,
+ unsigned long uaddr, void *dst, const void *src,
+ unsigned long len)
IMP_MOD_DEP_WRAPPER(copy_to_user_page, vma, page, uaddr, dst, src, len)
+#else /* copy_to_user_page */
+#define swap_copy_to_user_page copy_to_user_page
#endif /* copy_to_user_page */
-static DECLARE_MOD_FUNC_DEP(access_process_vm, int, struct task_struct * tsk, unsigned long addr, void *buf, int len, int write);
-
static DECLARE_MOD_FUNC_DEP(find_extend_vma, struct vm_area_struct *, struct mm_struct * mm, unsigned long addr);
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 30)
struct page *, struct vm_area_struct * vma, \
unsigned long address, unsigned int foll_flags, \
unsigned int *page_mask);
-DECLARE_MOD_DEP_WRAPPER(follow_page_mask, struct page *, \
- struct vm_area_struct * vma, \
- unsigned long address, \
- unsigned int foll_flags, \
- unsigned int *page_mask)
+DECLARE_MOD_DEP_WRAPPER(swap_follow_page_mask,
+ struct page *,
+ struct vm_area_struct * vma, unsigned long address,
+ unsigned int foll_flags, unsigned int *page_mask)
IMP_MOD_DEP_WRAPPER (follow_page_mask, vma, address, foll_flags, page_mask)
#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) */
static DECLARE_MOD_FUNC_DEP(follow_page, \
struct page *, struct vm_area_struct * vma, \
unsigned long address, unsigned int foll_flags);
-DECLARE_MOD_DEP_WRAPPER(follow_page, struct page *, \
- struct vm_area_struct * vma, \
- unsigned long address, \
- unsigned int foll_flags)
+DECLARE_MOD_DEP_WRAPPER(swap_follow_page,
+ struct page *,
+ struct vm_area_struct * vma, unsigned long address,
+ unsigned int foll_flags)
IMP_MOD_DEP_WRAPPER (follow_page, vma, address, foll_flags)
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) */
static DECLARE_MOD_FUNC_DEP(vm_normal_page, \
struct page *, struct vm_area_struct *vma, \
unsigned long addr, pte_t pte);
-static DECLARE_MOD_FUNC_DEP(flush_ptrace_access, \
- void, struct vm_area_struct *vma, struct page *page, \
- unsigned long uaddr, void *kaddr, unsigned long len, int write);
#if (LINUX_VERSION_CODE != KERNEL_VERSION(2, 6, 16))
void, struct rcu_head * rhp);
#endif
- DECLARE_MOD_DEP_WRAPPER(access_process_vm, int, struct task_struct *tsk, unsigned long addr, void *buf, int len, int write)
-IMP_MOD_DEP_WRAPPER (access_process_vm, tsk, addr, buf, len, write)
-
- DECLARE_MOD_DEP_WRAPPER (find_extend_vma, struct vm_area_struct *, struct mm_struct * mm, unsigned long addr)
+DECLARE_MOD_DEP_WRAPPER(swap_find_extend_vma,
+ struct vm_area_struct *,
+ struct mm_struct * mm, unsigned long addr)
IMP_MOD_DEP_WRAPPER (find_extend_vma, mm, addr)
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 30)
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18)
- DECLARE_MOD_DEP_WRAPPER (handle_mm_fault, \
- int, struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, int write_access)
+DECLARE_MOD_DEP_WRAPPER(swap_handle_mm_fault,
+ int,
+ struct mm_struct *mm, struct vm_area_struct *vma,
+ unsigned long address, int write_access)
IMP_MOD_DEP_WRAPPER (handle_mm_fault, mm, vma, address, write_access)
#endif
#else
- DECLARE_MOD_DEP_WRAPPER (handle_mm_fault, \
- int, struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, unsigned int flags)
+DECLARE_MOD_DEP_WRAPPER(swap_handle_mm_fault,
+ int,
+ struct mm_struct *mm, struct vm_area_struct *vma,
+ unsigned long address, unsigned int flags)
IMP_MOD_DEP_WRAPPER (handle_mm_fault, mm, vma, address, flags)
#endif
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
- DECLARE_MOD_DEP_WRAPPER (get_gate_vma, \
- struct vm_area_struct *, struct mm_struct *mm)
+DECLARE_MOD_DEP_WRAPPER(swap_get_gate_vma,
+ struct vm_area_struct *,
+ struct mm_struct *mm)
IMP_MOD_DEP_WRAPPER (get_gate_vma, mm)
#else /* LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38) */
- DECLARE_MOD_DEP_WRAPPER (get_gate_vma, \
- struct vm_area_struct *, struct task_struct *tsk)
+DECLARE_MOD_DEP_WRAPPER(swap_get_gate_vma,
+ struct vm_area_struct *,
+ struct task_struct *tsk)
IMP_MOD_DEP_WRAPPER (get_gate_vma, tsk)
#endif /* LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38) */
#ifdef CONFIG_HUGETLB_PAGE
- DECLARE_MOD_DEP_WRAPPER (follow_hugetlb_page, int, struct mm_struct *mm, struct vm_area_struct *vma, struct page **pages, struct vm_area_struct **vmas, unsigned long *position, int *length, int i, unsigned int write)
+DECLARE_MOD_DEP_WRAPPER(swap_follow_hugetlb_page,
+ int,
+ struct mm_struct *mm, struct vm_area_struct *vma,
+ struct page **pages, struct vm_area_struct **vmas,
+ unsigned long *position, int *length, int i,
+ unsigned int write)
IMP_MOD_DEP_WRAPPER (follow_hugetlb_page, mm, vma, pages, vmas, position, length, i, write)
-#endif
+#else /* CONFIG_HUGETLB_PAGE */
+#define swap_follow_hugetlb_page follow_hugetlb_page
+#endif /* CONFIG_HUGETLB_PAGE */
static inline int dbi_in_gate_area(struct task_struct *task, unsigned long addr)
{
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
-DECLARE_MOD_DEP_WRAPPER(in_gate_area_no_mm, int, unsigned long addr)
+DECLARE_MOD_DEP_WRAPPER(swap_in_gate_area_no_mm, int, unsigned long addr)
IMP_MOD_DEP_WRAPPER(in_gate_area_no_mm, addr)
#else /* LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38) */
-DECLARE_MOD_DEP_WRAPPER(in_gate_area_no_task, int, unsigned long addr)
+DECLARE_MOD_DEP_WRAPPER(swap_in_gate_area_no_task, int, unsigned long addr)
IMP_MOD_DEP_WRAPPER(in_gate_area_no_task, addr)
#endif /* LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38) */
static inline int dbi_in_gate_area_no_xxx(unsigned long addr)
{
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
- return in_gate_area_no_mm(addr);
+ return swap_in_gate_area_no_mm(addr);
#else /* LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38) */
- return in_gate_area_no_task(addr);
+ return swap_in_gate_area_no_task(addr);
#endif /* LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38) */
}
-DECLARE_MOD_DEP_WRAPPER (__flush_anon_page, \
- void, struct vm_area_struct *vma, \
- struct page *page, unsigned long vmaddr)
+DECLARE_MOD_DEP_WRAPPER(swap__flush_anon_page,
+ void,
+ struct vm_area_struct *vma, struct page *page,
+ unsigned long vmaddr)
IMP_MOD_DEP_WRAPPER (__flush_anon_page, vma, page, vmaddr)
-DECLARE_MOD_DEP_WRAPPER(vm_normal_page, \
- struct page *, struct vm_area_struct *vma, \
- unsigned long addr, pte_t pte)
+static inline void swap_flush_anon_page(struct vm_area_struct *vma,
+ struct page *page,
+ unsigned long vmaddr)
+{
+#if defined(ARCH_HAS_FLUSH_ANON_PAGE) && defined(CONFIG_ARM)
+ if (PageAnon(page))
+ swap__flush_anon_page(vma, page, vmaddr);
+#else /* defined(ARCH_HAS_FLUSH_ANON_PAGE) && defined(CONFIG_ARM) */
+ flush_anon_page(vma, page, vmaddr);
+#endif /* defined(ARCH_HAS_FLUSH_ANON_PAGE) && defined(CONFIG_ARM) */
+}
+
+DECLARE_MOD_DEP_WRAPPER(swap_vm_normal_page,
+ struct page *,
+ struct vm_area_struct *vma, unsigned long addr,
+ pte_t pte)
IMP_MOD_DEP_WRAPPER (vm_normal_page, vma, addr, pte)
-DECLARE_MOD_DEP_WRAPPER(flush_ptrace_access, \
- void, struct vm_area_struct *vma, struct page *page, \
- unsigned long uaddr, void *kaddr, unsigned long len, int write)
-IMP_MOD_DEP_WRAPPER(flush_ptrace_access, vma, page, uaddr, kaddr, len, write)
INIT_MOD_DEP_VAR(find_extend_vma, find_extend_vma);
INIT_MOD_DEP_VAR(get_gate_vma, get_gate_vma);
- INIT_MOD_DEP_VAR(flush_ptrace_access, flush_ptrace_access);
#ifdef CONFIG_HUGETLB_PAGE
INIT_MOD_DEP_VAR(follow_hugetlb_page, follow_hugetlb_page);
INIT_MOD_DEP_VAR(in_gate_area_no_task, in_gate_area_no_task);
#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)) */
+#if defined(ARCH_HAS_FLUSH_ANON_PAGE) && defined(CONFIG_ARM)
INIT_MOD_DEP_VAR(__flush_anon_page, __flush_anon_page);
+#endif /* defined(ARCH_HAS_FLUSH_ANON_PAGE) && defined(CONFIG_ARM) */
+
INIT_MOD_DEP_VAR(vm_normal_page, vm_normal_page);
- INIT_MOD_DEP_VAR(access_process_vm, access_process_vm);
#if (LINUX_VERSION_CODE != KERNEL_VERSION(2, 6, 16))
# if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 11))
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 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,
do {
struct vm_area_struct *vma;
- vma = find_extend_vma(mm, start);
+ vma = swap_find_extend_vma(mm, start);
if (!vma && dbi_in_gate_area(tsk, start)) {
unsigned long pg = start & PAGE_MASK;
pgd_t *pgd;
pte_unmap(pte);
return i ? : -EFAULT;
}
- vma = get_gate_vma(mm);
+ vma = swap_get_gate_vma(mm);
if (pages) {
struct page *page;
- page = vm_normal_page(vma, start, *pte);
+ page = swap_vm_normal_page(vma, start, *pte);
if (!page) {
if (!(gup_flags & FOLL_DUMP) &&
swap_is_zero_pfn(pte_pfn(*pte)))
return i ? : -EFAULT;
if (is_vm_hugetlb_page(vma)) {
- i = follow_hugetlb_page(mm, vma, pages, vmas,
+ i = swap_follow_hugetlb_page(mm, vma, pages, vmas,
&start, &nr_pages, i, gup_flags);
continue;
}
return i ? i : -ERESTARTSYS;
/* cond_resched(); */
- while (!(page = follow_page_mask(vma, start,
+ while (!(page = swap_follow_page_mask(vma, start,
foll_flags, &page_mask))) {
int ret;
unsigned int fault_flags = 0;
if (foll_flags & FOLL_NOWAIT)
fault_flags |= (FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_RETRY_NOWAIT);
- ret = handle_mm_fault(mm, vma, start,
+ ret = swap_handle_mm_fault(mm, vma, start,
fault_flags);
if (ret & VM_FAULT_ERROR) {
if (pages) {
pages[i] = page;
- flush_anon_page(vma, page, start);
+ swap_flush_anon_page(vma, page, start);
flush_dcache_page(page);
page_mask = 0;
}
do {
struct vm_area_struct *vma;
- vma = find_extend_vma(mm, start);
+ vma = swap_find_extend_vma(mm, start);
if (!vma && dbi_in_gate_area_no_xxx(start)) {
unsigned long pg = start & PAGE_MASK;
pgd_t *pgd;
pte_unmap(pte);
return i ? : -EFAULT;
}
- vma = get_gate_vma(mm);
+ vma = swap_get_gate_vma(mm);
if (pages) {
struct page *page;
- page = vm_normal_page(vma, start, *pte);
+ page = swap_vm_normal_page(vma, start, *pte);
if (!page) {
if (!(gup_flags & FOLL_DUMP) &&
swap_is_zero_pfn(pte_pfn(*pte)))
}
if (is_vm_hugetlb_page(vma)) {
- i = follow_hugetlb_page(mm, vma, pages, vmas,
+ i = swap_follow_hugetlb_page(mm, vma, pages, vmas,
&start, &nr_pages, i, gup_flags);
continue;
}
}
/* cond_resched(); */
- while (!(page = follow_page(vma, start, foll_flags))) {
+ while (!(page = swap_follow_page(vma, start, foll_flags))) {
int ret;
unsigned int fault_flags = 0;
if (foll_flags & FOLL_NOWAIT)
fault_flags |= (FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_RETRY_NOWAIT);
- ret = handle_mm_fault(mm, vma, start,
+ ret = swap_handle_mm_fault(mm, vma, start,
fault_flags);
if (ret & VM_FAULT_ERROR) {
if (pages) {
pages[i] = page;
- flush_anon_page(vma, page, start);
+ swap_flush_anon_page(vma, page, start);
flush_dcache_page(page);
}
next_page:
vma = find_vma(mm, start);
if (!vma && dbi_in_gate_area(tsk, start)) {
unsigned long pg = start & PAGE_MASK;
- struct vm_area_struct *gate_vma = get_gate_vma(tsk);
+ struct vm_area_struct *gate_vma = swap_get_gate_vma(tsk);
pgd_t *pgd;
pud_t *pud;
pmd_t *pmd;
return i ? : -EFAULT;
}
if (pages) {
- struct page *page = vm_normal_page(gate_vma, start, *pte);
+ struct page *page = swap_vm_normal_page(gate_vma, start, *pte);
pages[i] = page;
if (page)
get_page(page);
return i ? : -EFAULT;
if (is_vm_hugetlb_page(vma)) {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
- i = follow_hugetlb_page(mm, vma, pages, vmas,
- &start, &len, i);
-#else
- i = follow_hugetlb_page(mm, vma, pages, vmas,
+ i = swap_follow_hugetlb_page(mm, vma, pages, vmas,
&start, &len, i, write);
-#endif
continue;
}
//cond_resched();
DBPRINTF ("pages = %p vma = %p\n", pages, vma);
- while (!(page = follow_page(vma, start, foll_flags))) {
+ while (!(page = swap_follow_page(vma, start, foll_flags))) {
int ret;
- ret = handle_mm_fault(mm, vma, start,
+ ret = swap_handle_mm_fault(mm, vma, start,
foll_flags & FOLL_WRITE);
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
if (pages) {
pages[i] = page;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
- flush_anon_page(page, start);
-#else
- flush_anon_page(vma, page, start);
-#endif
+ swap_flush_anon_page(vma, page, start);
flush_dcache_page(page);
}
if (vmas)
maddr = atomic ? dbi_kmap_atomic(page) : kmap(page);
if (write) {
- copy_to_user_page(vma, page, addr,
+ swap_copy_to_user_page(vma, page, addr,
maddr + offset, buf, bytes);
set_page_dirty_lock(page);
} else {