mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 08:26:59 +00:00
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>
This commit is contained in:
parent
19f5ee2716
commit
65b6ecc038
1 changed files with 5 additions and 0 deletions
|
@ -1199,6 +1199,11 @@ static unsigned long xol_get_insn_slot(struct uprobe *uprobe, unsigned long slot
|
||||||
vaddr = kmap_atomic(area->page);
|
vaddr = kmap_atomic(area->page);
|
||||||
memcpy(vaddr + offset, uprobe->arch.insn, MAX_UINSN_BYTES);
|
memcpy(vaddr + offset, uprobe->arch.insn, MAX_UINSN_BYTES);
|
||||||
kunmap_atomic(vaddr);
|
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;
|
return current->utask->xol_vaddr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue