]> Gentwo Git Trees - linux/.git/commit
tracing: Display some syscall arrays as strings
authorSteven Rostedt <rostedt@goodmis.org>
Tue, 28 Oct 2025 23:11:20 +0000 (19:11 -0400)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Wed, 29 Oct 2025 00:10:58 +0000 (20:10 -0400)
commit011ea0501daaba36c06910fd383cf7428ea45844
tree147b4e468ca55f32775e0e50fa53ba6acc537912
parentb4f7624cfc9422209b844793521c60edb289fb69
tracing: Display some syscall arrays as strings

Some of the system calls that read a fixed length of memory from the user
space address are not arrays but strings. Take a bit away from the nb_args
field in the syscall meta data to use as a flag to denote that the system
call's user_arg_size is being used as a string. The nb_args should never
be more than 6, so 7 bits is plenty to hold that number. When the
user_arg_is_str flag that, when set, will display the data array from the
user space address as a string and not an array.

This will allow the output to look like this:

  sys_sethostname(name: 0x5584310eb2a0 "debian", len: 6)

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Takaya Saeki <takayas@google.com>
Cc: Tom Zanussi <zanussi@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ian Rogers <irogers@google.com>
Cc: Douglas Raillard <douglas.raillard@arm.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Link: https://lore.kernel.org/20251028231147.930550359@kernel.org
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
include/trace/syscall.h
kernel/trace/trace_syscalls.c