Re: [for-next][PATCH 1/4] ftrace/x86: Add dynamic allocated trampoline for ftrace_ops

2014-11-06 Thread Borislav Petkov
On Thu, Nov 06, 2014 at 08:57:15AM -0500, Steven Rostedt wrote: > > > +/* Trampolines can only be created if modules are supported */ > > > > Just for my own understanding: why? You're not loading additional .ko's > > right? > > It goes back to the EXEC issue. The module allocation goes through >

Re: [for-next][PATCH 1/4] ftrace/x86: Add dynamic allocated trampoline for ftrace_ops

2014-11-06 Thread Steven Rostedt
On Wed, 5 Nov 2014 11:28:01 +0100 Borislav Petkov wrote: > > --- a/arch/x86/kernel/ftrace.c > > +++ b/arch/x86/kernel/ftrace.c > > @@ -17,6 +17,7 @@ > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -644,13 +645,8 @@ int __init ftrace_

Re: [for-next][PATCH 1/4] ftrace/x86: Add dynamic allocated trampoline for ftrace_ops

2014-11-05 Thread Borislav Petkov
On Mon, Oct 27, 2014 at 02:27:03PM -0400, Steven Rostedt wrote: > From: "Steven Rostedt (Red Hat)" > > The current method of handling multiple function callbacks is to register > a list function callback that calls all the other callbacks based on > their hash tables and compare it to the functio

Re: Re: [for-next][PATCH 1/4] ftrace/x86: Add dynamic allocated trampoline for ftrace_ops

2014-11-02 Thread Masami Hiramatsu
(2014/11/01 1:01), Steven Rostedt wrote: > On Fri, 31 Oct 2014 14:19:03 +0900 > Masami Hiramatsu wrote: > > >>> + /* Load the contents of ptr into the callback parameter */ >>> + offset = (unsigned long)ptr; >>> + offset -= (unsigned long)trampoline + op_offset + OP_REF_SIZE; >>> + >>> +

Re: [for-next][PATCH 1/4] ftrace/x86: Add dynamic allocated trampoline for ftrace_ops

2014-10-31 Thread Steven Rostedt
On Fri, 31 Oct 2014 14:19:03 +0900 Masami Hiramatsu wrote: > > + /* Load the contents of ptr into the callback parameter */ > > + offset = (unsigned long)ptr; > > + offset -= (unsigned long)trampoline + op_offset + OP_REF_SIZE; > > + > > + op_ptr.offset = offset; > > + > > + /* put in

Re: [for-next][PATCH 1/4] ftrace/x86: Add dynamic allocated trampoline for ftrace_ops

2014-10-30 Thread Masami Hiramatsu
Hi Steven, (2014/10/28 3:27), Steven Rostedt wrote: > +static unsigned long create_trampoline(struct ftrace_ops *ops) > +{ > + unsigned const char *jmp; > + unsigned long start_offset; > + unsigned long end_offset; > + unsigned long op_offset; > + unsigned long offset; > +

Re: [for-next][PATCH 1/4] ftrace/x86: Add dynamic allocated trampoline for ftrace_ops

2014-10-30 Thread Steven Rostedt
H. Peter, Can you give me your acked-by for this. Thanks! -- Steve On Mon, 27 Oct 2014 14:27:03 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Red Hat)" > > The current method of handling multiple function callbacks is to register > a list function callback that calls all the other

[for-next][PATCH 1/4] ftrace/x86: Add dynamic allocated trampoline for ftrace_ops

2014-10-27 Thread Steven Rostedt
From: "Steven Rostedt (Red Hat)" The current method of handling multiple function callbacks is to register a list function callback that calls all the other callbacks based on their hash tables and compare it to the function that the callback was called on. But this is very inefficient. For exam