linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] kprobes: Make KUnit and add stacktrace on kretprobe tests
@ 2021-10-08 12:28 Masami Hiramatsu
  2021-10-08 12:28 ` [PATCH 1/8] kprobes: convert tests to kunit Masami Hiramatsu
                   ` (7 more replies)
  0 siblings, 8 replies; 27+ messages in thread
From: Masami Hiramatsu @ 2021-10-08 12:28 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Naveen N . Rao, Ananth N Mavinakayanahalli, Ingo Molnar,
	linux-kernel, mhiramat, Sven Schnelle, Catalin Marinas,
	Will Deacon, Russell King, Nathan Chancellor, Nick Desaulniers,
	linux-arm-kernel

Hi,

Here is the series to change the kprobes selftest to KUnit and
add testcases for stacktrace on kretprobes, which has been fixed
recently on x86.

KUnit conversion work has been done by Sven. (Thanks!)
I found that if there are testcases for the stacktrace on kretprobes
we can make sure that the stacktrace can work or not while booting.
So I added 2 additinal Kunit test cases for stacktrace on kretprobe.
One is for a simple stacktrace on kretprobe, the other is for the
stacktrace with kretprobes on nested functions.

But actually, this is currently only for the x86. Thus I also added
some fixes to enable stacktrace on kretprobe on arm and arm64.

Note that for the arm, this series only supports framepointer
based stacktrace. To support ARM unwinder, will need more work.

Thank you,

---

Masami Hiramatsu (7):
      kprobes: Add a test case for stacktrace from kretprobe handler
      arm64: kprobes: Record frame pointer with kretprobe instance
      arm64: kprobes: Make a frame pointer on __kretprobe_trampoline
      arm64: Recover kretprobe modified return address in stacktrace
      ARM: clang: Do not relay on lr register for stacktrace
      ARM: kprobes: Make a frame pointer on __kretprobe_trampoline
      ARM: Recover kretprobe modified return address in stacktrace

Sven Schnelle (1):
      kprobes: convert tests to kunit


 arch/Kconfig                                  |    8 +
 arch/arm/Kconfig                              |    1 
 arch/arm/include/asm/stacktrace.h             |    5 
 arch/arm/kernel/return_address.c              |    2 
 arch/arm/kernel/stacktrace.c                  |   11 +
 arch/arm/probes/kprobes/core.c                |   29 ++
 arch/arm64/Kconfig                            |    1 
 arch/arm64/include/asm/stacktrace.h           |    2 
 arch/arm64/kernel/probes/kprobes.c            |    4 
 arch/arm64/kernel/probes/kprobes_trampoline.S |    4 
 arch/arm64/kernel/stacktrace.c                |    3 
 arch/x86/Kconfig                              |    1 
 kernel/kprobes.c                              |    3 
 kernel/test_kprobes.c                         |  374 ++++++++++++++-----------
 lib/Kconfig.debug                             |    3 
 15 files changed, 278 insertions(+), 173 deletions(-)

--
Masami Hiramatsu (Linaro) <mhiramat@kernel.org>

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2021-10-15  0:18 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08 12:28 [PATCH 0/8] kprobes: Make KUnit and add stacktrace on kretprobe tests Masami Hiramatsu
2021-10-08 12:28 ` [PATCH 1/8] kprobes: convert tests to kunit Masami Hiramatsu
2021-10-08 12:28 ` [PATCH 2/8] kprobes: Add a test case for stacktrace from kretprobe handler Masami Hiramatsu
2021-10-08 12:28 ` [PATCH 3/8] arm64: kprobes: Record frame pointer with kretprobe instance Masami Hiramatsu
2021-10-13  8:14   ` Will Deacon
2021-10-13 10:01   ` Mark Rutland
2021-10-14  8:04     ` Masami Hiramatsu
2021-10-14  9:13       ` Mark Rutland
2021-10-14 10:01         ` Masami Hiramatsu
2021-10-14 10:27           ` Mark Rutland
2021-10-14 13:50             ` Masami Hiramatsu
2021-10-08 12:28 ` [PATCH 4/8] arm64: kprobes: Make a frame pointer on __kretprobe_trampoline Masami Hiramatsu
2021-10-13  8:14   ` Will Deacon
2021-10-08 12:28 ` [PATCH 5/8] arm64: Recover kretprobe modified return address in stacktrace Masami Hiramatsu
2021-10-13  8:14   ` Will Deacon
2021-10-14  8:05     ` Masami Hiramatsu
2021-10-13 10:13   ` Mark Rutland
2021-10-14  9:57     ` Masami Hiramatsu
2021-10-08 12:29 ` [PATCH 6/8] ARM: clang: Do not relay on lr register for stacktrace Masami Hiramatsu
2021-10-11 18:45   ` Nick Desaulniers
2021-10-12 14:18     ` Masami Hiramatsu
2021-10-13 19:54       ` Nick Desaulniers
2021-10-14 16:53   ` Russell King (Oracle)
2021-10-15  0:18     ` Masami Hiramatsu
2021-10-08 12:29 ` [PATCH 7/8] ARM: kprobes: Make a frame pointer on __kretprobe_trampoline Masami Hiramatsu
2021-10-11 19:06   ` Nick Desaulniers
2021-10-08 12:29 ` [PATCH 8/8] ARM: Recover kretprobe modified return address in stacktrace Masami Hiramatsu

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).