From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Martin Kaiser <martin@kaiser.cx>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] tracing: fprobe: do not zero out unused fgraph_data
Date: Wed, 25 Mar 2026 00:42:38 +0900 [thread overview]
Message-ID: <20260325004238.a25e7dc93f891d4cf17f76aa@kernel.org> (raw)
In-Reply-To: <20260324083903.414352aa@gandalf.local.home>
On Tue, 24 Mar 2026 08:39:03 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
> On Tue, 24 Mar 2026 09:47:08 +0100
> Martin Kaiser <martin@kaiser.cx> wrote:
>
> Hi Martin,
>
> First, please do not send a v2 as a reply to v1. A new version should
> always start a new mail thread.
>
> > If fprobe_entry does not fill the allocated fgraph_data completely, the
> > unused part does not have to be zeroed.
> >
> > fgraph_data is a short-lived part of the shadow stack. The preceding
> > length field allows locating the end regardless of the content.
> >
> > Signed-off-by: Martin Kaiser <martin@kaiser.cx>
> > ---
> > v2:
>
> But to maintain a link to the previous version, I recommend adding here:
>
> Changes since v1: https://lore.kernel.org/all/20260324084804.375764-1-martin@kaiser.cx
Ah, this is a good idea for the patch which does not have cover mail.
Thanks :)
>
>
> > - remove the memset instead of fixing the length
> >
> > kernel/trace/fprobe.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/kernel/trace/fprobe.c b/kernel/trace/fprobe.c
> > index dcadf1d23b8a..56d145017902 100644
> > --- a/kernel/trace/fprobe.c
> > +++ b/kernel/trace/fprobe.c
> > @@ -450,8 +450,6 @@ static int fprobe_fgraph_entry(struct ftrace_graph_ent *trace, struct fgraph_ops
> > used += FPROBE_HEADER_SIZE_IN_LONG + size_words;
> > }
> > }
> > - if (used < reserved_words)
> > - memset(fgraph_data + used, 0, reserved_words - used);
> >
> > /* If any exit_handler is set, data must be used. */
> > return used != 0;
>
> As for the patch,
>
> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
>
> -- Steve
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
next prev parent reply other threads:[~2026-03-24 15:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 10:19 [PATCH] tracing: fprobe: fix the length of unused fgraph_data Martin Kaiser
2026-03-23 12:06 ` Masami Hiramatsu
2026-03-23 14:48 ` Steven Rostedt
2026-03-24 0:34 ` Masami Hiramatsu
2026-03-24 8:05 ` Martin Kaiser
2026-03-24 15:39 ` Masami Hiramatsu
2026-03-24 8:47 ` [PATCH v2] tracing: fprobe: do not zero out " Martin Kaiser
2026-03-24 12:39 ` Steven Rostedt
2026-03-24 15:42 ` Masami Hiramatsu [this message]
2026-03-24 15:40 ` Masami Hiramatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260325004238.a25e7dc93f891d4cf17f76aa@kernel.org \
--to=mhiramat@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=martin@kaiser.cx \
--cc=mathieu.desnoyers@efficios.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.