Re: [PATCH -v5 05/17] x86/ftrace: Use text_poke()

Peter Zijlstra
2019-11-14T14:06:03Z

On Thu, Nov 14, 2019 at 08:56:28AM -0500, Steven Rostedt wrote:
> On Thu, 14 Nov 2019 14:18:27 +0100
> Peter Zijlstra <peterz@infradead.org> wrote:
>
> > On Wed, Nov 13, 2019 at 09:27:41AM -0500, Steven Rostedt wrote:
> >
> > > Yeah, let's keep it this way, but still needs a comment.
> >
> > The function now reads:
> >
> > int ftrace_arch_code_modify_post_process(void)
> > __releases(&text_mutex)
> > {
> > /*
> > * ftrace_module_enable()
> > * ftrace_arch_code_modify_prepare()
> > * do_for_each_ftrace_rec()
> > * __ftrace_replace_code()
> > * ftrace_make_{call,nop}()
> > * ftrace_modify_code_direct()
> > * text_poke_queue()
> > * ftrace_arch_code_modify_post_process()
> > * text_poke_finish()
>
> Perhaps just:
>
> /*
> * ftrace_make_{call,nop}() may be called during
> * module load, and we need to finish the text_poke_queue()
> * that they do, here.
> > */
>
>
> > text_poke_finish();
> > ftrace_poke_late = 0;
> > mutex_unlock(&text_mutex);
> > return 0;
> > }
> >
> > Patch is otherwise unchanged.
>
> Other than that:
>
> Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

Done and thanks!