diff options
| author | Douglas Raillard <[email protected]> | 2025-03-25 16:52:02 +0000 |
|---|---|---|
| committer | Steven Rostedt (Google) <[email protected]> | 2025-03-25 21:42:38 +0000 |
| commit | 4d38328eb442dc06aec4350fd9594ffa6488af02 (patch) | |
| tree | 48da9780c214d5c1b2055ff62af7e76f582b56cc /tools/perf/util/scripting-engines/trace-event-python.c | |
| parent | tracing: Do not use PERF enums when perf is not defined (diff) | |
| download | kernel-4d38328eb442dc06aec4350fd9594ffa6488af02.tar.gz kernel-4d38328eb442dc06aec4350fd9594ffa6488af02.zip | |
tracing: Fix synth event printk format for str fields
The printk format for synth event uses "%.*s" to print string fields,
but then only passes the pointer part as var arg.
Replace %.*s with %s as the C string is guaranteed to be null-terminated.
The output in print fmt should never have been updated as __get_str()
handles the string limit because it can access the length of the string in
the string meta data that is saved in the ring buffer.
Cc: [email protected]
Cc: Masami Hiramatsu <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Fixes: 8db4d6bfbbf92 ("tracing: Change synthetic event string format to limit printed length")
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Douglas Raillard <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions
