mirror of https://github.com/dynup/kpatch
kmod/core: ftrace function_graph tracer compatibility
Steven Rostedt recommended to return "regs->ip + MCOUNT_INSN_SIZE", which is what the function_graph tracer expects. This fixes function_graph tracing for a patched function. This change also means that the function tracer will only show the patched function once (corresponding to a trace of the original function) rather than twice. This is probably more in line with what a user would expect.
This commit is contained in:
parent
79bd9f03ee
commit
d2201980e6
|
@ -413,7 +413,7 @@ kpatch_ftrace_handler(unsigned long ip, unsigned long parent_ip,
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
if (func)
|
if (func)
|
||||||
regs->ip = func->new_addr;
|
regs->ip = func->new_addr + MCOUNT_INSN_SIZE;
|
||||||
|
|
||||||
preempt_enable_notrace();
|
preempt_enable_notrace();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue