mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
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>
This commit is contained in:
parent
36aabfff50
commit
6d2289f3fa
3 changed files with 19 additions and 10 deletions
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue