From: Masami Hiramatsu <mhiramat@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>, Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
lkml <linux-kernel@vger.kernel.org>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@chromium.org>,
Steven Rostedt <rostedt@goodmis.org>,
"Naveen N . Rao" <naveen.n.rao@linux.ibm.com>,
Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>,
"David S . Miller" <davem@davemloft.net>
Subject: [PATCH v8 00/11] fprobe: Introduce fprobe function entry/exit probe
Date: Fri, 11 Feb 2022 20:54:06 +0900 [thread overview]
Message-ID: <164458044634.586276.3261555265565111183.stgit@devnote2> (raw)
Hi,
Here is the 8th version of fprobe. This version fixes a build error
when CONFIG_FUNCTION_TRACER=n, and add a KUnit based selftest.
The previous version is here[1];
[1] https://lore.kernel.org/all/164360522462.65877.1891020292202285106.stgit@devnote2/T/#u
This series introduces the fprobe, the function entry/exit probe
with multiple probe point support. This also introduces the rethook
for hooking function return as same as the kretprobe does. This
abstraction will help us to generalize the fgraph tracer,
because we can just switch to it from the rethook in fprobe,
depending on the kernel configuration.
The patch [1/10] is from Jiri's series[2].
[2] https://lore.kernel.org/all/20220104080943.113249-1-jolsa@kernel.org/T/#u
And the patch [9/10] adds the FPROBE_FL_KPROBE_SHARED flag for the case
if user wants to share the same code (or share a same resource) on the
fprobe and the kprobes.
I forcibly updated my kprobes/fprobe branch, you can pull this series
from:
https://git.kernel.org/pub/scm/linux/kernel/git/mhiramat/linux.git kprobes/fprobe
Thank you,
---
Jiri Olsa (1):
ftrace: Add ftrace_set_filter_ips function
Masami Hiramatsu (10):
fprobe: Add ftrace based probe APIs
rethook: Add a generic return hook
rethook: x86: Add rethook x86 implementation
ARM: rethook: Add rethook arm implementation
arm64: rethook: Add arm64 rethook implementation
fprobe: Add exit_handler support
fprobe: Add sample program for fprobe
fprobe: Introduce FPROBE_FL_KPROBE_SHARED flag for fprobe
docs: fprobe: Add fprobe description to ftrace-use.rst
fprobe: Add a selftest for fprobe
Documentation/trace/fprobe.rst | 171 +++++++++++++
Documentation/trace/index.rst | 1
arch/arm/Kconfig | 1
arch/arm/include/asm/stacktrace.h | 4
arch/arm/kernel/stacktrace.c | 6
arch/arm/probes/Makefile | 1
arch/arm/probes/rethook.c | 71 +++++
arch/arm64/Kconfig | 1
arch/arm64/include/asm/stacktrace.h | 2
arch/arm64/kernel/probes/Makefile | 1
arch/arm64/kernel/probes/rethook.c | 25 ++
arch/arm64/kernel/probes/rethook_trampoline.S | 87 ++++++
arch/arm64/kernel/stacktrace.c | 7 -
arch/x86/Kconfig | 1
arch/x86/include/asm/unwind.h | 8 +
arch/x86/kernel/Makefile | 1
arch/x86/kernel/kprobes/common.h | 1
arch/x86/kernel/rethook.c | 115 ++++++++
include/linux/fprobe.h | 105 ++++++++
include/linux/ftrace.h | 3
include/linux/kprobes.h | 3
include/linux/rethook.h | 100 +++++++
include/linux/sched.h | 3
kernel/exit.c | 2
kernel/fork.c | 3
kernel/trace/Kconfig | 26 ++
kernel/trace/Makefile | 2
kernel/trace/fprobe.c | 341 +++++++++++++++++++++++++
kernel/trace/ftrace.c | 58 ++++
kernel/trace/rethook.c | 313 +++++++++++++++++++++++
lib/Kconfig.debug | 12 +
lib/Makefile | 2
lib/test_fprobe.c | 125 +++++++++
samples/Kconfig | 7 +
samples/Makefile | 1
samples/fprobe/Makefile | 3
samples/fprobe/fprobe_example.c | 120 +++++++++
37 files changed, 1719 insertions(+), 14 deletions(-)
create mode 100644 Documentation/trace/fprobe.rst
create mode 100644 arch/arm/probes/rethook.c
create mode 100644 arch/arm64/kernel/probes/rethook.c
create mode 100644 arch/arm64/kernel/probes/rethook_trampoline.S
create mode 100644 arch/x86/kernel/rethook.c
create mode 100644 include/linux/fprobe.h
create mode 100644 include/linux/rethook.h
create mode 100644 kernel/trace/fprobe.c
create mode 100644 kernel/trace/rethook.c
create mode 100644 lib/test_fprobe.c
create mode 100644 samples/fprobe/Makefile
create mode 100644 samples/fprobe/fprobe_example.c
--
Masami Hiramatsu (Linaro) <mhiramat@kernel.org>
next reply other threads:[~2022-02-11 11:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-11 11:54 Masami Hiramatsu [this message]
2022-02-11 11:54 ` [PATCH v8 01/11] ftrace: Add ftrace_set_filter_ips function Masami Hiramatsu
2022-02-11 11:54 ` [PATCH v8 02/11] fprobe: Add ftrace based probe APIs Masami Hiramatsu
2022-02-11 11:54 ` [PATCH v8 03/11] rethook: Add a generic return hook Masami Hiramatsu
2022-02-11 11:54 ` [PATCH v8 04/11] rethook: x86: Add rethook x86 implementation Masami Hiramatsu
2022-02-11 11:55 ` [PATCH v8 05/11] ARM: rethook: Add rethook arm implementation Masami Hiramatsu
2022-02-11 11:55 ` [PATCH v8 06/11] arm64: rethook: Add arm64 rethook implementation Masami Hiramatsu
2022-02-11 11:55 ` [PATCH v8 07/11] fprobe: Add exit_handler support Masami Hiramatsu
2022-02-11 11:55 ` [PATCH v8 08/11] fprobe: Add sample program for fprobe Masami Hiramatsu
2022-02-11 11:55 ` [PATCH v8 09/11] fprobe: Introduce FPROBE_FL_KPROBE_SHARED flag " Masami Hiramatsu
2022-02-11 11:55 ` [PATCH v8 10/11] docs: fprobe: Add fprobe description to ftrace-use.rst Masami Hiramatsu
2022-02-11 11:56 ` [PATCH v8 11/11] fprobe: Add a selftest for fprobe Masami Hiramatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=164458044634.586276.3261555265565111183.stgit@devnote2 \
--to=mhiramat@kernel.org \
--cc=andrii@kernel.org \
--cc=anil.s.keshavamurthy@intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=john.fastabend@gmail.com \
--cc=jolsa@redhat.com \
--cc=kafai@fb.com \
--cc=kpsingh@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=naveen.n.rao@linux.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=songliubraving@fb.com \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).