]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Add ptr-hash option to show the hashed pointer value
authorMasami Hiramatsu <mhiramat@kernel.org>
Thu, 15 Oct 2020 14:55:25 +0000 (23:55 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 11 Feb 2021 21:31:57 +0000 (16:31 -0500)
commitb39224d77c7061144c694f6f8385a98593b683ff
tree5924d99849bd3cc4fc2072f69a46f377114cc807
parenta4c5adc60bae2eb7cd469954ad7e3feb288ee339
tracing: Add ptr-hash option to show the hashed pointer value

Add tracefs/options/hash-ptr option to show hashed pointer
value by %p in event printk format string.

For the security reason, normal printk will show the hashed
pointer value (encrypted by random number) with %p to printk
buffer to hide the real address. But the tracefs/trace always
shows real address for debug. To bridge those outputs, add an
option to switch the output format. Ftrace users can use it
to find the hashed value corresponding to the real address
in trace log.

Link: https://lkml.kernel.org/r/160277372504.29307.14909828808982012211.stgit@devnote2
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Documentation/trace/ftrace.rst
kernel/trace/trace.c
kernel/trace/trace.h