[PATCH 0/5] tracing: probes: Use heap instead of stack for temporary buffers

Masami Hiramatsu (Google)
2025-07-18T11:34:02Z

Hi,

Here is a series of cleanup patches which allocate temporary buffers
and objects on heap (slab) instead of the stack. This reduces a
possibility of stack overflow. This may reduce the performance but
the modified path is not a hot path.

---

Masami Hiramatsu (Google) (5):
tracing: probe: Allocate traceprobe_parse_context from heap
tracing: fprobe-event: Allocate string buffers from heap
tracing: kprobe-event: Allocate string buffers from heap
tracing: eprobe-event: Allocate string buffers from heap
tracing: uprobe-event: Allocate string buffers from heap

kernel/trace/trace_eprobe.c | 38 +++++++++++++++++++++++--------
kernel/trace/trace_fprobe.c | 52 ++++++++++++++++++++++++++++---------------
kernel/trace/trace_kprobe.c | 49 ++++++++++++++++++++++++++---------------
kernel/trace/trace_probe.h | 9 +++++++
kernel/trace/trace_uprobe.c | 37 ++++++++++++++++++++++---------
5 files changed, 129 insertions(+), 56 deletions(-)

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