diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2014-06-20 23:31:26 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2014-07-01 07:13:37 -0400 |
commit | 6d2289f3faa71dcc5bba15c7aeba4f31c185b6df (patch) | |
tree | 8425f1195f29a670dcb1ad00e56ee1836514ab02 /include/linux/trace_seq.h | |
parent | 36aabfff50b6a03bcfd2c3cfbd7b83eb0a9ce0c1 (diff) | |
download | lwn-6d2289f3faa71dcc5bba15c7aeba4f31c185b6df.tar.gz lwn-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 'include/linux/trace_seq.h')
-rw-r--r-- | include/linux/trace_seq.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/include/linux/trace_seq.h b/include/linux/trace_seq.h index 1f05317f51c4..8283762ab7ef 100644 --- a/include/linux/trace_seq.h +++ b/include/linux/trace_seq.h @@ -25,8 +25,6 @@ trace_seq_init(struct trace_seq *s) s->full = 0; } -#define MAX_MEMHEX_BYTES 8 - /* * Currently only defined when tracing is enabled. */ |