lkml.org 
[lkml]   [2017]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 01/12] uprobes: split THPs before trying replace them
From
Date
On Wed, 2017-01-25 at 08:55 -0800, Srikar Dronamraju wrote:
> >
> > >
> > >
> > > >
> > > > For THPs page_check_address() always fails. It's better to
> > > > split them
> > > > first before trying to replace.
> > > So what does this mean.  uprobes simply fails to work when trying
> > > to
> > > place a probe into a THP memory region?
> > Looks like we can end up with endless retry loop in
> > uprobe_write_opcode().
> >
> > >
> > > How come nobody noticed (and reported) this when using the
> > > feature?
> > I guess it's not often used for anon memory.
> >
> The first time the breakpoint is hit on a page, it replaces the text
> page with anon page.  Now lets assume we insert breakpoints in all
> the
> pages in a range. Here each page is individually replaced by a non
> THP
> anonpage. (since we dont have bulk breakpoint insertion support,
> breakpoint insertion happens one at a time). Now the only interesting
> case may be when each of these replaced pages happen to be physically
> contiguous so that THP kicks in to replace all of these pages with
> one
> THP page. Can happen in practice?
>
> Are there any other cases that I have missed?

A JIT compiler placing executable code in anonymous
memory before executing it, and a debugger trying to
insert a uprobe in one of those areas?

Not common, but I suppose it could be done.

--
All rights reversed
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2017-01-25 18:45    [W:0.434 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site