[RFC PATCH] uprobes: copy to user-space xol page with proper cache flushing

David Miller davem at davemloft.net
Fri Apr 11 11:02:13 PDT 2014


From: Linus Torvalds <torvalds at linux-foundation.org>
Date: Fri, 11 Apr 2014 10:50:31 -0700

> So I really think we should just have a fixed
> "flush_icache_page(page,vaddr)" function. Maybe add a "len" argument,
> to allow architectures that have to loop over cachelines to do just a
> minimal loop.

It's not enough, we need to have the 'mm' so we can know what cpu's this
address space has executed upon, and therefore what cpus need the broadcast
flush.

See my other reply, we can just make a __copy_to_user_page() that takes 'mm'
and a boolean 'executable' which uprobes can unconditionally pass as true.



More information about the linux-arm-kernel mailing list