2023-05-17 04:23:47

by Ze Gao

[permalink] [raw]
Subject: [PATCH v3 0/3] Make fprobe + rethook immune to recursion

Hi all,

This is the 3rd version of patch series that fix the ftrace rethook recursion problem.

Changes since v2:
- refine commit message of [PATCH v2 2/4] fprobe: make fprobe_kprobe_handler recursion free

v1: https://lore.kernel.org/linux-trace-kernel/[email protected]/T/
v2: https://lore.kernel.org/linux-trace-kernel/ZGP4ypidaxQGdp7Y@krava/T/#mb9e74fe74d5800ee424234b26c6def9d5135237b

The original discussions of this bug can be checked out here:

https://lore.kernel.org/bpf/CAD8CoPCfPmqZH6BJCk3Y1-02BLVVsbQ6OeaNOhcfGWmdF0oX8A@mail.gmail.com/T/#t

Ze Gao (4):
rethook: use preempt_{disable, enable}_notrace in
rethook_trampoline_handler
fprobe: make fprobe_kprobe_handler recursion free
fprobe: add recursion detection in fprobe_exit_handler
rethook, fprobe: do not trace rethook related functions

arch/riscv/kernel/probes/Makefile | 2 +
arch/s390/kernel/Makefile | 1 +
arch/x86/kernel/Makefile | 1 +
kernel/trace/fprobe.c | 73 ++++++++++++++++++++++++-------
kernel/trace/rethook.c | 4 +-
5 files changed, 64 insertions(+), 17 deletions(-)

--
2.40.1