diff options
Diffstat (limited to 'arch/arm/kernel/uprobes.c')
-rw-r--r-- | arch/arm/kernel/uprobes.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/kernel/uprobes.c b/arch/arm/kernel/uprobes.c index f9bacee973bf..56adf9c1fde0 100644 --- a/arch/arm/kernel/uprobes.c +++ b/arch/arm/kernel/uprobes.c | |||
@@ -113,6 +113,26 @@ int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, | |||
113 | return 0; | 113 | return 0; |
114 | } | 114 | } |
115 | 115 | ||
116 | void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr, | ||
117 | void *src, unsigned long len) | ||
118 | { | ||
119 | void *xol_page_kaddr = kmap_atomic(page); | ||
120 | void *dst = xol_page_kaddr + (vaddr & ~PAGE_MASK); | ||
121 | |||
122 | preempt_disable(); | ||
123 | |||
124 | /* Initialize the slot */ | ||
125 | memcpy(dst, src, len); | ||
126 | |||
127 | /* flush caches (dcache/icache) */ | ||
128 | flush_uprobe_xol_access(page, vaddr, dst, len); | ||
129 | |||
130 | preempt_enable(); | ||
131 | |||
132 | kunmap_atomic(xol_page_kaddr); | ||
133 | } | ||
134 | |||
135 | |||
116 | int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) | 136 | int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) |
117 | { | 137 | { |
118 | struct uprobe_task *utask = current->utask; | 138 | struct uprobe_task *utask = current->utask; |