lkml.org 
[lkml]   [2010]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: linux-next: add utrace tree
    On 01/27/2010 05:59 AM, Steven Rostedt wrote:
    > [ Added Arjan ]
    >
    > On Wed, 2010-01-27 at 02:43 -0800, Linus Torvalds wrote:
    >>
    >> On Wed, 27 Jan 2010, Peter Zijlstra wrote:
    >>>
    >>> 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.

    -hpa

    --
    H. Peter Anvin, Intel Open Source Technology Center
    I work for Intel. I don't speak on their behalf.



    \
     
     \ /
      Last update: 2010-01-27 18:51    [W:0.031 / U:0.124 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site