[lkml]   [2010]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: linux-next: add utrace tree

    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.

    Even the "overwrite only the first byte with 'int3'" made them go "umm, I
    need to talk to some core CPU people to see if that's ok". They mumble
    about possible CPU errata, I$ coherency, instruction retry etc.

    I realize kprobes does this very thing, but kprobes is esoteric stuff and
    doesn't have much choice. In user space, you _could_ do the modification
    on a different physical page and then just switch the page table entry
    instead, and not get into the whole D$/I$ coherency thing at all.


     \ /
      Last update: 2010-01-27 11:47    [W:0.021 / U:19.900 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site