aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/events
diff options
context:
space:
mode:
authorRabin Vincent <rabin@rab.in>2012-11-14 18:27:07 +0100
committerOleg Nesterov <oleg@redhat.com>2012-11-14 18:32:24 +0100
commit65b6ecc03838fd263cf7fafdfa6cf13012b91d56 (patch)
treee32752232a7f4f4272ca70d6b9bab6c20d56cbee /kernel/events
parent19f5ee2716373519fda2129e9333f4c3847aa742 (diff)
downloadkernel_goldelico_gta04-65b6ecc03838fd263cf7fafdfa6cf13012b91d56.zip
kernel_goldelico_gta04-65b6ecc03838fd263cf7fafdfa6cf13012b91d56.tar.gz
kernel_goldelico_gta04-65b6ecc03838fd263cf7fafdfa6cf13012b91d56.tar.bz2
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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 39c75cc..5ce99cf 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
vaddr = kmap_atomic(area->page);
memcpy(vaddr + offset, uprobe->arch.insn, MAX_UINSN_BYTES);
kunmap_atomic(vaddr);
+ /*
+ * We probably need flush_icache_user_range() but it needs vma.
+ * This should work on supported architectures too.
+ */
+ flush_dcache_page(area->page);
return current->utask->xol_vaddr;
}