kprobes: Make KUnit and add stacktrace on kretprobe tests
Get series with b4
b4 am 163369609308.636038.15295764725220907794.stgit@devnote2Versions newest first
- v1 Latest8 patches 18 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | kprobes: convert tests to kunitkernel/ kernel/ lib/ | +61 | 0 replies | |
| 2/8 | kprobes: Add a test case for stacktrace from kretprobe handlerarch/ arch/ kernel/ | +167 | 0 replies | |
| 3/8 | arm64: kprobes: Record frame pointer with kretprobe instancearch/ | +2 | 7 replies | |
| 4/8 | arm64: kprobes: Make a frame pointer on __kretprobe_trampolinearch/ | +4 | 1 reply | |
| 5/8 | arm64: Recover kretprobe modified return address in stacktracearch/ arch/ arch/ | +6 | 4 replies | |
| 6/8 | ARM: clang: Do not relay on lr register for stacktracearch/ | +1 | 5 replies | |
| 7/8 | ARM: kprobes: Make a frame pointer on __kretprobe_trampolinearch/ | +24 | 1 reply | |
| 8/8 | ARM: Recover kretprobe modified return address in stacktracearch/ arch/ arch/ +1 more | +16 | 0 replies |
Reviews trailers per patch
5 of 8 patches have a Reviewed-by or Acked-by.
| Patch | Masami Hiramatsu | Nick Desaulniers | Will Deacon | Mark Rutland |
|---|---|---|---|---|
| 1/8 | A-b | |||
| 2/8 | ||||
| 3/8 | A-b | A-b | ||
| 4/8 | A-b | |||
| 5/8 | ||||
| 6/8 | T-b R-b | |||
| 7/8 | R-b | |||
| 8/8 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH 0/8] kprobes: Make KUnit and add stacktrace on kretprobe tests
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) <[email protected]>