summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_output.h
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2014-06-21 05:31:26 +0200
committerSteven Rostedt <rostedt@goodmis.org>2014-07-01 13:13:37 +0200
commit6d2289f3faa71dcc5bba15c7aeba4f31c185b6df (patch)
tree8425f1195f29a670dcb1ad00e56ee1836514ab02 /kernel/trace/trace_output.h
parenttracing: Clean up trace_seq.c (diff)
downloadlinux-6d2289f3faa71dcc5bba15c7aeba4f31c185b6df.tar.xz
linux-6d2289f3faa71dcc5bba15c7aeba4f31c185b6df.zip
tracing: Make trace_seq_putmem_hex() more robust
Currently trace_seq_putmem_hex() can only take as a parameter a pointer to something that is 8 bytes or less, otherwise it will overflow the buffer. This is protected by a macro that encompasses the call to trace_seq_putmem_hex() that has a BUILD_BUG_ON() for the variable before it is passed in. This is not very robust and if trace_seq_putmem_hex() ever gets used outside that macro it will cause issues. Instead of only being able to produce a hex output of memory that is for a single word, change it to be more robust and allow any size input. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_output.h')
-rw-r--r--kernel/trace/trace_output.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/kernel/trace/trace_output.h b/kernel/trace/trace_output.h
index bf7daf2237ed..80b25b585a70 100644
--- a/kernel/trace/trace_output.h
+++ b/kernel/trace/trace_output.h
@@ -43,7 +43,6 @@ do { \
#define SEQ_PUT_HEX_FIELD_RET(s, x) \
do { \
- BUILD_BUG_ON(sizeof(x) > MAX_MEMHEX_BYTES); \
if (!trace_seq_putmem_hex(s, &(x), sizeof(x))) \
return TRACE_TYPE_PARTIAL_LINE; \
} while (0)