lkml.org 
[lkml]   [2009]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 0/3][RFC] tracing/kprobes: prevent jprobes from crashing function graph tracer
    Frank Ch. Eigler wrote:
    > Steven Rostedt<rostedt@goodmis.org> writes:
    >
    >> [...] Jprobes and the function graph tracer use the same mechanism
    >> to trace the exit of a function. Unfortunately, only one can be done
    >> at a time. The function graph tracer replaces the return address
    >> with its own handler, but so does jprobes. The two are not
    >> compatible. [...]
    >
    > What about kretprobes? It too uses the same mechanism.

    Exactly, kretprobe uses similar mechanism with func-graph tracer.

    Fortunately, it doesn't cause any problem, because kretprobe doesn't
    skip any function-return, and func-graph tracer(mcount) always intrudes
    a function after kretprobe.

    ---
    call func
    <-- kretprobe prehandler changes return address
    func()
    <-- func-graph prehandler changes return address
    ...
    return
    --> func-graph trampoline sets ip to "kretprobe trampoline"
    --> kretprobe trampoline sets ip to "real return address"
    (return address)
    ---

    So that kretprobe handler doesn't conflict with function graph tracer.

    Thank you,

    --
    Masami Hiramatsu

    Software Engineer
    Hitachi Computer Products (America), Inc.
    Software Solutions Division

    e-mail: mhiramat@redhat.com



    \
     
     \ /
      Last update: 2009-11-01 15:51    [W:0.022 / U:0.488 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site