lkml.org 
[lkml]   [2014]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 1/3] ftrace/x86: Add dynamic allocated trampoline for ftrace_ops
(2014/07/04 5:07), Steven Rostedt wrote:
> +
> +void arch_ftrace_update_trampoline(struct ftrace_ops *ops)
> +{
> + unsigned char *new;
> + unsigned long start_offset;
> + unsigned long call_offset;
> + unsigned long offset;
> + unsigned long ip;
> + int ret;
> +
> + if (ops->trampoline) {
> + /*
> + * The ftrace_ops caller may set up its own trampoline.
> + * In such a case, this code must not modify it.
> + */
> + if (!(ops->flags & FTRACE_OPS_FL_ALLOC_TRAMP))
> + return;

Just a question, what happen if the ftrace_ops caller sets up a trampoline which is
not compatible to the ftrace's trampoline, and the ftrace_ops conflicts on a IP with other
ftrace_ops? I guess in that case ftrace will use the loop callback on the IP, but since
the trampoline is not compatible, the result will not be same, is that right? :)

Thank you,

--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com




\
 
 \ /
  Last update: 2014-07-04 16:01    [W:0.131 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site