lkml.org 
[lkml]   [2010]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateMon, 8 Feb 2010 07:54:25 +0100
FromPavel Machek <>
SubjectRe: linux-next: add utrace tree
Hi!

> >>> Right, so you're going to love uprobes, which does exactly that. The
> >>> current proposal is overwriting the target instruction with an INT3 and
> >>> injecting an extra vma into the target process's address space
> >>> containing the original instruction(s) and possible jumps back to the
> >>> old code stream.
> >>
> >> Just out of interest, how does it handle the threading issue?
> >>
> >> Last I saw, at least some CPU people were _very_ nervous about overwriting
> >> instructions if another CPU might be just about to execute them.
> >
> > I think the issue was that ring 0 was never meant to do that, where as,
> > ring 3 does it all the time. Doesn't the dynamic library modify its
> > text?
>
> No, it has nothing to do with ring. It has to do with modifying code
> that another CPU could be executing at the same time, and with modifying
> code on the same processor through another virtual alias (they are
> different issues.) The same issues apply regardless of the CPL of the
> processor.

...but these are always 'there could be cpu bugs around' issues,
right? Like amd k6. AFAICT x86 always supported self-modifying code
without any extra barriers needed...

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2010-02-08 07:57    [from the cache]
©2003-2010