]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Move duplicate code of trace_kprobe/eprobe.c into header
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Wed, 12 Oct 2022 10:40:56 +0000 (06:40 -0400)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Wed, 12 Oct 2022 17:50:00 +0000 (13:50 -0400)
commit3fe23e8f83ec1a240eec56a4efd543b462a7f841
tree8a5e129e1baa01c3ab76ddfcaed6049686f77157
parentb40ea0959757fd82d9d2f02c31d10b566f9a34db
tracing: Move duplicate code of trace_kprobe/eprobe.c into header

The functions:

  fetch_store_strlen_user()
  fetch_store_strlen()
  fetch_store_string_user()
  fetch_store_string()

are identical in both trace_kprobe.c and trace_eprobe.c. Move them into
a new header file trace_probe_kernel.h to share it. This code will later
be used by the synthetic events as well.

Marked for stable as a fix for a crash in synthetic events requires it.

Link: https://lkml.kernel.org/r/20221012104534.467668078@goodmis.org
Cc: stable@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Tom Zanussi <zanussi@kernel.org>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Reviewed-by: Tom Zanussi <zanussi@kernel.org>
Fixes: 8788697514a56 ("tracing: Add support for dynamic strings to synthetic events")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_eprobe.c
kernel/trace/trace_kprobe.c
kernel/trace/trace_probe_kernel.h [new file with mode: 0644]