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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250724001806.2dfd6baf4990f952ee77b6c6@kernel.org>
Date: Thu, 24 Jul 2025 00:18:06 +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 v3 1/1] tracing: Remove "__attribute__()" from the type
 field of event format

On Wed, 23 Jul 2025 10:40:30 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:

> On Tue, 15 Jul 2025 19:56:02 +0900
> "Masami Hiramatsu (Google)" <mhiramat@...nel.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@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ