lkml.org 
[lkml]   [2019]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC][PATCH 1/2] ftrace: Add modify_ftrace_direct()
On Tue, Nov 19, 2019 at 6:13 AM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Mon, 18 Nov 2019 22:04:28 -0800
> Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:
>
> > I took your for-next without the extra patch and used it from bpf trampoline.
> > It's looking good so far. Passed basic testing. Will add more stress tests.
> >
> > Do you mind doing:
> > diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
> > index 73eb2e93593f..6ddb203ca550 100644
> > --- a/include/linux/ftrace.h
> > +++ b/include/linux/ftrace.h
> > @@ -256,16 +256,16 @@ struct ftrace_direct_func
> > *ftrace_find_direct_func(unsigned long addr);
> > # define ftrace_direct_func_count 0
> > static inline int register_ftrace_direct(unsigned long ip, unsigned long addr)
> > {
> > - return -ENODEV;
> > + return -ENOTSUPP;
> > }
> > static inline int unregister_ftrace_direct(unsigned long ip, unsigned
> > long addr)
> > {
> > - return -ENODEV;
> > + return -ENOTSUPP;
> > }
> > static inline int modify_ftrace_direct(unsigned long ip,
> > unsigned long old_addr,
> > unsigned long new_addr)
> > {
> > - return -ENODEV;
> > + return -ENOTSUPP;
> > }
> >
> > otherwise ENODEV is a valid error when ip is incorrect which is
> > indistinguishable from ftrace not compiled in.
>
> Sure I can add this. Want to add a Signed-off-by to it, and I'll just
> pull it in directly? I can write up the change log.

Whichever way is easier for you.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Thanks!

> -- Steve

\
 
 \ /
  Last update: 2019-11-19 16:38    [W:0.045 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site