]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tracing/probes: Limit size of event probe to 3K
authorSteven Rostedt <rostedt@goodmis.org>
Tue, 28 Apr 2026 16:23:02 +0000 (12:23 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 29 Apr 2026 20:07:38 +0000 (16:07 -0400)
commitb2aa3b4d64e460ac606f386c24e7d8a873ce6f1a
tree4687d9d5c912c18448bda8fd59d5e4e8fe262648
parent5ec07d5204b4544271f32f6261ee097fe53cb081
tracing/probes: Limit size of event probe to 3K

There currently isn't a max limit an event probe can be. One could make an
event greater than PAGE_SIZE, which makes the event useless because if
it's bigger than the max event that can be recorded into the ring buffer,
then it will never be recorded.

A event probe should never need to be greater than 3K, so make that the
max size. As long as the max is less than the max that can be recorded
onto the ring buffer, it should be fine.

Cc: stable@vger.kernel.org
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Fixes: 93ccae7a22274 ("tracing/kprobes: Support basic types on dynamic events")
Link: https://patch.msgid.link/20260428122302.706610ba@gandalf.local.home
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_probe.c
kernel/trace/trace_probe.h