Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 65b6ecc0 authored by Rabin Vincent's avatar Rabin Vincent Committed by Oleg Nesterov
Browse files

uprobes: Flush cache after xol write



Flush the cache so that the instructions written to the XOL area are
visible.

Signed-off-by: default avatarRabin Vincent <rabin@rab.in>
Acked-by: default avatarAnanth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
parent 19f5ee27
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;
}