From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/1] tracing: Remove "__attribute__()" from the type field of event format
Date: Thu, 24 Jul 2025 00:18:06 +0900 [thread overview]
Message-ID: <20250724001806.2dfd6baf4990f952ee77b6c6@kernel.org> (raw)
In-Reply-To: <20250723104030.6ec24dfd@batman.local.home>
On Wed, 23 Jul 2025 10:40:30 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
> On Tue, 15 Jul 2025 19:56:02 +0900
> "Masami Hiramatsu (Google)" <mhiramat@kernel.org> wrote:
>
> > +static void
> > +trace_event_update_with_eval_map(struct module *mod,
> > + struct trace_eval_map **start,
> > + int len)
> > {
> > struct trace_eval_map **map;
> >
> > - if (len <= 0)
> > - return;
> > -
> > map = start;
> >
> > - trace_event_eval_update(map, len);
> > + /* This must run always for sanitizing. */
> > + trace_event_update_all(map, len);
> > +
> > + if (len <= 0)
> > + return;
> >
> > trace_insert_eval_map_file(mod, start, len);
> > }
>
> So this will add more work during boot up as it is processed on every
> event regardless if it has an eval map or not. But this is only needed
> if CONFIG_DEBUG_INFO_BTF=y and PAHOLE_HAS_BTF_TAG=y is enabled.
Hmm, In this case can we check it in trace_event_update_all()?
If we need to sanitize more word, it is easier to add a condition
there.
Or, maybe we can sanitize it while building the kernel as a part
of post build process.
Thanks,
>
> What about having this be:
>
> /* Always run sanitizer if PAHOLE_HAS_BTF_TAG is set */
> if (!IS_ENABLED(CONFIG_PAHOLE_HAS_BTF_TAG) && len <= 0)
> return;
>
> map = start;
>
> trace_event_update_all(map, len);
>
> if (len <= 0)
> return;
>
> trace_insert_eval_map_file(mod, start, len);
> }
>
> -- Steve
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
next prev parent reply other threads:[~2025-07-23 15:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 10:55 [PATCH v3 0/1] tracing: Fix an event field filter issue Masami Hiramatsu (Google)
2025-07-15 10:56 ` [PATCH v3 1/1] tracing: Remove "__attribute__()" from the type field of event format Masami Hiramatsu (Google)
2025-07-23 14:40 ` Steven Rostedt
2025-07-23 15:18 ` Masami Hiramatsu [this message]
2025-07-23 15:23 ` Steven Rostedt
2025-07-24 3:52 ` 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=20250724001806.2dfd6baf4990f952ee77b6c6@kernel.org \
--to=mhiramat@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).