linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] tracing/eprobes: Fixes for unexpected arguments
@ 2022-08-20 13:43 Steven Rostedt
  2022-08-20 13:43 ` [PATCH v2 1/6] tracing/eprobes: Do not allow eprobes to use $stack, or % for regs Steven Rostedt
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Steven Rostedt @ 2022-08-20 13:43 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Masami Hiramatsu, Tzvetomir Stoyanov,
	Tom Zanussi


While using eprobes, I decided to entertain the thougth of what would
happen if I tried to get the instruction pointer "%rip", knowing full
well that eprobes do not have access to pt_regs. Well, I found out, and
it led me down a rabbit hole of bugs.

This series fixes those bugs, by not allowing register access for eprobes,
and also filling the holes of @symbol and @immediate argument.

Changes since v1: https://lore.kernel.org/all/20220820014035.531145719@goodmis.org/
  - Fixed parenthesis warning

  - Fixed comment about comm arguments

  - Made kprobes and eprobes process "$COMM" as well as "$comm"

  - Made filters consistent with histograms with "common_cpu"

Steven Rostedt (Google) (6):
      tracing/eprobes: Do not allow eprobes to use $stack, or % for regs
      tracing/eprobes: Do not hardcode $comm as a string
      tracing/eprobes: Fix reading of string fields
      tracing/eprobes: Have event probes be consistent with kprobes and uprobes
      tracing/probes: Have kprobes and uprobes use $COMM too
      tracing: Have filter accept "common_cpu" to be consistent

----
 kernel/trace/trace_eprobe.c | 91 ++++++++++++++++++++++++++++++++++++++++++---
 kernel/trace/trace_events.c |  1 +
 kernel/trace/trace_probe.c  | 29 +++++++++------
 3 files changed, 104 insertions(+), 17 deletions(-)

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

end of thread, other threads:[~2022-08-21 15:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-20 13:43 [PATCH v2 0/6] tracing/eprobes: Fixes for unexpected arguments Steven Rostedt
2022-08-20 13:43 ` [PATCH v2 1/6] tracing/eprobes: Do not allow eprobes to use $stack, or % for regs Steven Rostedt
2022-08-20 13:43 ` [PATCH v2 2/6] tracing/eprobes: Do not hardcode $comm as a string Steven Rostedt
2022-08-20 13:43 ` [PATCH v2 3/6] tracing/eprobes: Fix reading of string fields Steven Rostedt
2022-08-20 13:43 ` [PATCH v2 4/6] tracing/eprobes: Have event probes be consistent with kprobes and uprobes Steven Rostedt
2022-08-20 13:43 ` [PATCH v2 5/6] tracing/probes: Have kprobes and uprobes use $COMM too Steven Rostedt
2022-08-21 15:19   ` Masami Hiramatsu
2022-08-21 15:40     ` Steven Rostedt
2022-08-20 13:43 ` [PATCH v2 6/6] tracing: Have filter accept "common_cpu" to be consistent Steven Rostedt
2022-08-21 15:14   ` Masami Hiramatsu

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).