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: <20250730092003.72fdfa30ea25a451e062f08d@kernel.org>
Date: Wed, 30 Jul 2025 09:20:03 +0900
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH v5 1/1] tracing: Remove "__attribute__()" from the type
 field of event format

On Tue, 29 Jul 2025 12:33:49 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:

> On Tue, 29 Jul 2025 14:10:35 +0900
> "Masami Hiramatsu (Google)" <mhiramat@...nel.org> wrote:
> 
> >  static void update_event_fields(struct trace_event_call *call,
> >  				struct trace_eval_map *map)
> >  {
> >  	struct ftrace_event_field *field;
> > +	const char *eval_string = NULL;
> >  	struct list_head *head;
> > +	int len = 0;
> >  	char *ptr;
> >  	char *str;
> > -	int len = strlen(map->eval_string);
> >  
> >  	/* Dynamic events should never have field maps */
> > -	if (WARN_ON_ONCE(call->flags & TRACE_EVENT_FL_DYNAMIC))
> > +	if (call->flags & TRACE_EVENT_FL_DYNAMIC)
> >  		return;
> 
> Is there a reason you removed the WARN_ON_ONCE()?

Yeah, I removed that, but maybe I misunderstood.

> 
> Even for the attribute, this shouldn't be called by dynamic events. Or
> do you know of a case?

Yeah, with this change, trace_event_update_all() is changed to call
update_event_fields() on all events even if there is no eval map.
And this trace_event_update_all() is called from the below call chain;

trace_module_notify() -> trace_module_add_evals() -> trace_event_update_with_eval_map().

So, IIUC, if there is any dynamic events on the list, and a module is
loaded, trace_event_update_all() is called.

Hmm, if so, this is really inefficient. We need to introduce build-time
sanitize routine.

Thank you,

-- 
Masami Hiramatsu (Google) <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ