[RFC PATCH] ARM: uprobes need icache flush after xol write

Russell King - ARM Linux linux at arm.linux.org.uk
Wed Apr 9 09:38:03 PDT 2014


On Wed, Apr 09, 2014 at 05:18:26PM +0100, Russell King - ARM Linux wrote:
> On Tue, Apr 08, 2014 at 04:41:17PM +0100, Russell King - ARM Linux wrote:
> > I think let's start out by killing this function - the semantics of
> > this function have been lost, so it's not clear what it was supposed
> > to do in its original form.  Even going back to the start of git
> > history, it looks like it was never used outside arch code.
> 
> I floated a patch to remove flush_icache_user_range() to the architecture
> maintainers, giving the background to how this came about.  I received the
> following reply from David Miller:
> 
> > ptrace() accesses (via __access_remote_vm()) already use an existing
> > helper function for these sorts of situations, in the form of
> > copy_{to,from}_user_page().  I would suggest that uprobes uses that
> > as well.
> 
> I think this is a very valid point, and echo's my point.

More comments from David about using copy_{to,from}_user_page():

> They should use it at first, then if there is a problem we can identify
> exactly what can be optimized or needs to be, and expand the interface
> as needed.
>
> Let's not optimize first.

Please look into using this solution, thanks.

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.



More information about the linux-arm-kernel mailing list