]> 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)
commit0917d4ecb0812a35d805ce8fe87184194d3447b3
tree8a5e129e1baa01c3ab76ddfcaed6049686f77157
parentb25fc26afac059f27e36b550cc964876577d57aa
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: b5e6b83a2c6e8 ("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]