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: <20251020144732.308326bb@gandalf.local.home>
Date: Mon, 20 Oct 2025 14:47:32 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Douglas Raillard <douglas.raillard@....com>
Cc: Steven Rostedt <rostedt@...nel.org>, linux-kernel@...r.kernel.org,
 linux-trace-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
 Masami Hiramatsu <mhiramat@...nel.org>, Mark Rutland
 <mark.rutland@....com>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 Andrew Morton <akpm@...ux-foundation.org>, Peter Zijlstra
 <peterz@...radead.org>, Namhyung Kim <namhyung@...nel.org>, Takaya Saeki
 <takayas@...gle.com>, Tom Zanussi <zanussi@...nel.org>, Thomas Gleixner
 <tglx@...utronix.de>, Ian Rogers <irogers@...gle.com>, Arnaldo Carvalho de
 Melo <acme@...nel.org>, Jiri Olsa <jolsa@...nel.org>, Adrian Hunter
 <adrian.hunter@...el.com>, Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH v3 12/13] tracing: Check for printable characters when
 printing field dyn strings

On Mon, 20 Oct 2025 13:19:46 +0100
Douglas Raillard <douglas.raillard@....com> wrote:

> Hi Steve,
> 
> On 15-10-2025 18:32, Steven Rostedt wrote:
> > From: Steven Rostedt <rostedt@...dmis.org>
> > 
> > When the "fields" option is enabled, it prints each trace event field
> > based on its type. But a dynamic array and a dynamic string can both have
> > a "char *" type. Printing it as a string can cause escape characters to be
> > printed and mess up the output of the trace.  
> 
> We faced the same issue when converting trace.dat to other formats that distinguish
> between a byte buffer and an actual string. The current solution we have is to
> reserve "char []" for actual string and use "u8 []"/"uint8_t []" for byte buffers.
> 
> Obviously it does not solve the problem for existing events but that could be worth
> establishing a convention like that for new code and support it in trace_output.c ?
> Most uses of trace data beyond direct printing would require knowing the data schema
> from the header info, so value-based criteria are typically not suitable for that.

Well, what the types are is not quite controlled by me, but by whoever
writes a trace event. Thus, it's not going to be something I can control in trace_output.c

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ