diff options
author | Steven Rostedt <[email protected]> | 2024-10-03 10:49:25 -0400 |
---|---|---|
committer | Steven Rostedt (Google) <[email protected]> | 2024-10-03 16:43:22 -0400 |
commit | 50a3242d84ee1625b0bfef29b95f935958dccfbe (patch) | |
tree | e9e58f2a66b837742b1ff8dd7d253be884df2d33 /scripts/gdb/linux/modules.py | |
parent | 9852d85ec9d492ebef56dc5f229416c925758edc (diff) |
tracing: Fix trace_check_vprintf() when tp_printk is used
When the tp_printk kernel command line is used, the trace events go
directly to printk(). It is still checked via the trace_check_vprintf()
function to make sure the pointers of the trace event are legit.
The addition of reading buffers from previous boots required adding a
delta between the addresses of the previous boot and the current boot so
that the pointers in the old buffer can still be used. But this required
adding a trace_array pointer to acquire the delta offsets.
The tp_printk code does not provide a trace_array (tr) pointer, so when
the offsets were examined, a NULL pointer dereference happened and the
kernel crashed.
If the trace_array does not exist, just default the delta offsets to zero,
as that also means the trace event is not being read from a previous boot.
Link: https://lore.kernel.org/all/[email protected]/
Cc: Masami Hiramatsu <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Link: https://lore.kernel.org/[email protected]
Fixes: 07714b4bb3f98 ("tracing: Handle old buffer mappings for event strings and functions")
Reported-by: Alison Schofield <[email protected]>
Tested-by: Alison Schofield <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/modules.py')
0 files changed, 0 insertions, 0 deletions