]> git.baikalelectronics.ru Git - kernel.git/commit
tracing/probes: Fix a warning message to show correct maximum length
authorMasami Hiramatsu <mhiramat@kernel.org>
Fri, 10 Feb 2017 13:21:55 +0000 (22:21 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 15 Feb 2017 15:32:48 +0000 (10:32 -0500)
commit2114e379324b12c3d375803edf37e5b78141a6ed
treec2a46613ed750c5a84b8404219cafbc8f14ad413
parent7e7d678de922806eea1ee5712c5bb048b39a9515
tracing/probes: Fix a warning message to show correct maximum length

Since tracing/*probe_events will accept a probe definition
up to 4096 - 2 ('\n' and '\0') bytes, it must show 4094 instead
of 4096 in warning message.

Note that there is one possible case of exceed 4094. If user
prepare 4096 bytes null-terminated string and syscall write
it with the count == 4095, then it can be accepted. However,
if user puts a '\n' after that, it must rejected.
So IMHO, the warning message should indicate shorter one,
since it is safer.

Link: http://lkml.kernel.org/r/148673290462.2579.7966778294009665632.stgit@devbox
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_probe.c