[PATCH 6/9] uprobes: flush cache after xol write

Oleg Nesterov oleg at redhat.com
Wed Nov 14 12:37:17 EST 2012


On 11/04, Ananth N Mavinakayanahalli wrote:
>
> On Sat, Nov 03, 2012 at 05:33:01PM +0100, Oleg Nesterov wrote:
> >
> > [PATCH] uprobes: flush cache after xol write
> >
> > From: Rabin Vincent <rabin at rab.in>
> >
> > Flush the cache so that the instructions written to the XOL area are
> > visible.
> >
> > Signed-off-by: Rabin Vincent <rabin at rab.in>
>
> Acked-by: Ananth N Mavinakayanahalli <ananth at in.ibm.com>

Thanks Ananth.

I assume that Srikar and Rabin agree, applied as 65b6ecc038

> >
> > --- x/kernel/events/uprobes.c
> > +++ x/kernel/events/uprobes.c
> > @@ -1199,6 +1199,11 @@ static unsigned long xol_get_insn_slot(s
> >  	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;
> >  }




More information about the linux-arm-kernel mailing list