summaryrefslogtreecommitdiff
path: root/include/linux/seq_buf.h
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2021-02-26 00:51:23 +0300
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2021-03-18 19:58:26 +0300
commit5013f454a352cce8e62162976026a9c472595e42 (patch)
tree2751610508db73285c0c3ba59e3b254b6ef826a2 /include/linux/seq_buf.h
parente0196ae732343adfe8d854d88b3c0aae9595152f (diff)
downloadlinux-5013f454a352cce8e62162976026a9c472595e42.tar.xz
tracing: Add check of trace event print fmts for dereferencing pointers
Trace events record data into the ring buffer at the time of the event. The trace event has a printf logic to display the recorded data at a much later time when the user reads the trace file. This makes using dereferencing pointers unsafe if the dereferenced pointer points to the original source. The safe way to handle this is to create an array within the trace event and copy the source into the array. Then the dereference pointer may point to that array. As this is a easy mistake to make, a check is added to examine all trace event print fmts to make sure that they are safe to use. This only checks the various %p* dereferenced pointers like %pB, %pR, etc. It does not handle dereferencing of strings, as there are some use cases that are OK to dereference the source. That will be dealt with differently. Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/seq_buf.h')
0 files changed, 0 insertions, 0 deletions