Skip to content

Enable new kprobe event at boot

Masami Hiramatsu linux-doc lkml 2 versions – In review

Get series with b4
b4 am 155851393823.15728.9489409117921369593.stgit@devnote2

Versions newest first · linked by author and title

  1. v2 Latest2 patches 5 repliesIn review
  2. v12 patches 4 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2kprobes: Initialize kprobes at postcore_initcallkernel/kprobes.c+1 -20 replies
2/2tracing/kprobe: Add kprobe_event= boot parameterDocumentation/admin-guide/kernel-parameters.txt Documentation/trace/kprobetrace.rst kernel/trace/trace_kprobe.c+81 -013 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchAnders Roxell
1/2
2/2T-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/2] Enable new kprobe event at boot

Hi,

This v2 series adds a kernel parameter, 'kprobe_event=' to add and enable new kprobe events at boot time.

In this version, I changed to use postcore_initcall() instead of subsys_initcall() for kprobes initialization.

Currently ftrace can enable some existing trace events at boot time. This also allows admin/developer to add new kprobe-events at boot time to debug device drivers etc.

The syntax is similar to tracing/kprobe_events interface, but uses ',' and ';' instead of ' ' and '\n' respectively. e.g.

kprobe_event=p,func1,$arg1,$arg2;p,func2,$arg1

will add probes on func1 with the 1st and the 2nd arguments and on func2 with the 1st argument.

Note that 'trace_event=' option enables trace event at very early timing, but the events added by 'kprobe_event=' are enabled right before enabling device drivers at this point. It is enough for tracing device driver initialization etc.

Thank you,

---

Masami Hiramatsu (2):
kprobes: Initialize kprobes at postcore_initcall tracing/kprobe: Add kprobe_event= boot parameter

 Documentation/admin-guide/kernel-parameters.txt |   13 ++++++
 Documentation/trace/kprobetrace.rst             |   14 ++++++
 kernel/kprobes.c                                |    3 -
 kernel/trace/trace_kprobe.c                     |   54 +++++++++++++++++++++++
 4 files changed, 82 insertions(+), 2 deletions(-)

--
Masami Hiramatsu (Linaro)