linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] tracing: Fix adding some modifiers to histogram values
@ 2023-03-02  1:00 Steven Rostedt
  2023-03-02  1:00 ` [PATCH 1/2] tracing: Do not let histogram values have some modifiers Steven Rostedt
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Steven Rostedt @ 2023-03-02  1:00 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel
  Cc: Masami Hiramatsu, Mark Rutland, Andrew Morton


Mark Rutland reported to me on IRC that he accidentally added the
".buckets=8" modifier to hitcount. This should not be allowed, but it
did not error. Worse yet, when reading the hist file, it would crash
as there was a NULL pointer dereference due to the values not having
fields assigned to them.

The first fix is to make sure that histogram values do not get assigned
modifiers that they can't use.

The the second patch is to not crash if a NULL pointer is passed to
hist_field_name() (which is what happens if you allow some of these
modifiers to be used by values).

Steven Rostedt (Google) (2):
      tracing: Do not let histogram values have some modifiers
      tracing: Check field value in hist_field_name()

----
 kernel/trace/trace_events_hist.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-03-02 14:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-02  1:00 [PATCH 0/2] tracing: Fix adding some modifiers to histogram values Steven Rostedt
2023-03-02  1:00 ` [PATCH 1/2] tracing: Do not let histogram values have some modifiers Steven Rostedt
2023-03-02 14:24   ` Mark Rutland
2023-03-02  1:00 ` [PATCH 2/2] tracing: Check field value in hist_field_name() Steven Rostedt
2023-03-02 14:18   ` Mark Rutland
2023-03-02 13:18 ` [PATCH 0/2] tracing: Fix adding some modifiers to histogram values Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).