lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAYs2=jHMLBApdU_VSaeh8ypi62T_dNCVSL0GKGRQgPhiRBQSg@mail.gmail.com>
Date:   Wed, 23 Nov 2022 05:31:24 +0000
From:   Song Shuai <suagrfillet@...il.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Linux Trace Kernel <linux-trace-kernel@...r.kernel.org>,
        Masami Hiramatsu <mhiramat@...nel.org>
Subject: Re: [PATCH] ftrace: Avoid needless updates of the ftrace function call

Steven Rostedt <rostedt@...dmis.org> 于2022年11月23日周三 03:17写道:
>
> On Wed, 23 Nov 2022 10:29:28 +0800
> Song Shuai <suagrfillet@...il.com> wrote:
>
> > > @@ -2783,7 +2796,7 @@ void ftrace_modify_all_code(int command)
> > >          * traced.
> > >          */
> > >         if (update) {
> > > -               err = ftrace_update_ftrace_func(ftrace_ops_list_func);
> > > +               err = update_ftrace_func(ftrace_ops_list_func);
> > >                 if (FTRACE_WARN_ON(err))
> > >                         return;
> > >         }
> > > @@ -2799,7 +2812,7 @@ void ftrace_modify_all_code(int command)
> > >                 /* If irqs are disabled, we are in stop machine */
> > >                 if (!irqs_disabled())
> > >                         smp_call_function(ftrace_sync_ipi, NULL, 1);
> > > -               err = ftrace_update_ftrace_func(ftrace_trace_function);
> > > +               err = update_ftrace_func(ftrace_trace_function);
> > The helper function should only serve the ftrace_ops_list_func.
> >
> > And ftrace_trace_function is always different in this function with
> > FTRACE_UPDATE_TRACE_FUNC command.
> >
> > So this place should be left as it is.
>
> But it is needed to update the static variable. Without this change,
> then save_func will get set to ftrace_ops_list_func and never change
> after that and then the update to ftrace_ops_list_func will stop happening.
>
> -- Steve
Yes, you're right. Thx for your explanation.
-- Song

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ