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: <CAErzpmtdJP8MK9kmoi5BSzpUuJzsZ3+AxWV-jKGC8gPxbMTd4w@mail.gmail.com>
Date: Wed, 12 Nov 2025 09:47:08 +0800
From: Donglin Peng <dolinux.peng@...il.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-trace-kernel@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Sven Schnelle <svens@...ux.ibm.com>, Masami Hiramatsu <mhiramat@...nel.org>, 
	Donglin Peng <pengdonglin@...omi.com>
Subject: Re: [PATCH v2] function_graph: Enable funcgraph-args and
 funcgraph-retaddr to work simultaneously

On Wed, Nov 12, 2025 at 7:36 AM Steven Rostedt <rostedt@...dmis.org> wrote:
>
> On Tue, 11 Nov 2025 21:54:32 +0800
> Donglin Peng <dolinux.peng@...il.com> wrote:
>
> > +     /* Store the retaddr in args[0] */
> > +     if (type == TRACE_GRAPH_RETADDR_ENT)
> > +             entry->args[i++] = retaddr;
> > +
> >  #ifdef CONFIG_HAVE_FUNCTION_ARG_ACCESS_API
> > -     if (fregs) {
> > -             for (int i = 0; i < FTRACE_REGS_MAX_ARGS; i++)
> > -                     entry->args[i] = ftrace_regs_get_argument(fregs, i);
> > +     if (store_args) {
> > +             while (i < nr_args) {
>
> Nit, this could stay as a for loop. You just don't initialize the 'i':

Thanks, I will fix it in v3.

>
>                 for (; i < nr_args; i++) {
>
> > +                     entry->args[i] = ftrace_regs_get_argument(fregs,
> > +                                             i - (type == TRACE_GRAPH_RETADDR_ENT ? 1 : 0));
> > +                     i++;
>
> Then you don't need the "i++" here.
>
> -- Steve
>
> > +             }
> >       }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ