diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2019-05-07 22:55:41 +0900 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-05-08 12:15:11 -0400 |
commit | 4dd537aca25dd2e0e8aca8b8923930cbe6240003 (patch) | |
tree | 4237d1d2cd0c827fd2d3edd8040b5fd6a9337375 /kernel/trace/ring_buffer_benchmark.c | |
parent | 9e298e8604088a600d8100a111a532a9d342af09 (diff) |
tracing: uprobes: Re-enable $comm support for uprobe events
Since commit 533059281ee5 ("tracing: probeevent: Introduce new
argument fetching code") dropped the $comm support from uprobe
events, this re-enables it.
For $comm support, uses strlcpy() instead of strncpy_from_user()
to copy current task's comm. Because it is in the kernel space,
strncpy_from_user() always fails to copy the comm.
This also uses strlen() instead of strnlen_user() to measure the
length of the comm.
Note that this uses -ECOMM as a token value to fetch the comm
string. If the user-space pointer points -ECOMM, it will be
translated to task->comm.
Link: http://lkml.kernel.org/r/155723734162.9149.4042756162201097965.stgit@devnote2
Fixes: 533059281ee5 ("tracing: probeevent: Introduce new argument fetching code")
Reported-by: Andreas Ziegler <andreas.ziegler@fau.de>
Acked-by: Andreas Ziegler <andreas.ziegler@fau.de>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/ring_buffer_benchmark.c')
0 files changed, 0 insertions, 0 deletions