Skip to content

tracing/eprobes: Fixes for unexpected arguments

Steven Rostedt lkml stable 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 3 repliesIn review
  2. v14 patches 10 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6tracing/eprobes: Do not allow eprobes to use $stack, or % for regskernel/trace/trace_probe.c+13 -80 replies
2/6tracing/eprobes: Do not hardcode $comm as a stringkernel/trace/trace_probe.c+3 -20 replies
3/6tracing/eprobes: Fix reading of string fieldskernel/trace/trace_eprobe.c+21 -00 replies
4/6tracing/eprobes: Have event probes be consistent with kprobes and uprobeskernel/trace/trace_eprobe.c+64 -60 replies
5/6tracing/probes: Have kprobes and uprobes use $COMM tookernel/trace/trace_probe.c+3 -22 replies
6/6tracing: Have filter accept "common_cpu" to be consistentkernel/trace/trace_events.c+1 -01 reply

Reviews trailers per patch

4 of 6 patches have a Reviewed-by or Acked-by.

PatchMasami Hiramatsu (Google)
1/6A-b
2/6
3/6A-b
4/6
5/6A-b
6/6A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/6] tracing/eprobes: Fixes for unexpected arguments

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/[email protected]/
- 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(-)