History

tracing: Show real address for trace event arguments

To help debugging kernel, show real address for trace event arguments in tracefs/trace{,pipe} instead of hashed pointer value. Since ftrace human-readable format uses vsprintf(), all %p are translated to hash values instead of pointer address. However, when debugging the kernel, raw address value gives a hint when comparing with the memory mapping in the kernel. (Those are sometimes used with crash log, which is not hashed too) So converting %p with %px when calling trace_seq_printf(). Moreover, this is not improving the security because the tracefs can be used only by root user and the raw address values are readable from tracefs/percpu/cpu*/trace_pipe_raw file. Link: https://lkml.kernel.org/r/160277370703.29307.5134475491761971203.stgit@devnote2

Masami Hiramatsu committed 6 years ago

Commit efbbdaa1 parent 7d536755 files · +88 −3Browse files

Showing the changes to include/trace (1 of 5 files). Show all

Unified · Split

include/trace/trace_events.h+1−1
@@ -364,7 +364,7 @@ trace_raw_output_##call(struct trace_iterator *iter, int flags, \ · 363 unmodified lines
364364 if (ret != TRACE_TYPE_HANDLED) \
365365 return ret; \
366366 \
367− trace_seq_printf(s, print); \
367+ trace_event_printf(iter, print); \
368368 \
369369 return trace_handle_return(s); \
370370 } \