diff options
author | Rabin Vincent <rabin@rab.in> | 2012-11-14 12:27:07 -0500 |
---|---|---|
committer | Oleg Nesterov <oleg@redhat.com> | 2012-11-14 12:32:24 -0500 |
commit | 65b6ecc03838fd263cf7fafdfa6cf13012b91d56 (patch) | |
tree | e32752232a7f4f4272ca70d6b9bab6c20d56cbee /kernel/events | |
parent | 19f5ee2716373519fda2129e9333f4c3847aa742 (diff) |
uprobes: Flush cache after xol write
Flush the cache so that the instructions written to the XOL area are
visible.
Signed-off-by: Rabin Vincent <rabin@rab.in>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Diffstat (limited to 'kernel/events')
-rw-r--r-- | kernel/events/uprobes.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index 39c75cc51efc..5ce99cfd2e6e 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c | |||
@@ -1199,6 +1199,11 @@ static unsigned long xol_get_insn_slot(struct uprobe *uprobe, unsigned long slot | |||
1199 | vaddr = kmap_atomic(area->page); | 1199 | vaddr = kmap_atomic(area->page); |
1200 | memcpy(vaddr + offset, uprobe->arch.insn, MAX_UINSN_BYTES); | 1200 | memcpy(vaddr + offset, uprobe->arch.insn, MAX_UINSN_BYTES); |
1201 | kunmap_atomic(vaddr); | 1201 | kunmap_atomic(vaddr); |
1202 | /* | ||
1203 | * We probably need flush_icache_user_range() but it needs vma. | ||
1204 | * This should work on supported architectures too. | ||
1205 | */ | ||
1206 | flush_dcache_page(area->page); | ||
1202 | 1207 | ||
1203 | return current->utask->xol_vaddr; | 1208 | return current->utask->xol_vaddr; |
1204 | } | 1209 | } |