]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Handle %.*s in trace_check_vprintf()
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 13 May 2021 16:23:24 +0000 (12:23 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 13 May 2021 18:20:33 +0000 (14:20 -0400)
commitc02ca8248c035edf0b7e3006a330a41ec2de4c4c
tree6b461e8d593c507df90d3484a6c5a302d1cdc1b5
parent9fb51bb203ba1c67f480638e9d0605db59810687
tracing: Handle %.*s in trace_check_vprintf()

If a trace event uses the %*.s notation, the trace_check_vprintf() will
fail and will warn about a bad processing of strings, because it does not
take into account the length field when processing the star (*) part.
Have it handle this case as well.

Link: https://lore.kernel.org/linux-nfs/238C0E2D-C2A4-4578-ADD2-C565B3B99842@oracle.com/
Reported-by: Chuck Lever III <chuck.lever@oracle.com>
Fixes: 5d68f1cb107b7 ("tracing: Add a verifier to check string pointers for trace events")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace.c