summaryrefslogtreecommitdiff
path: root/scripts/stackusage
diff options
context:
space:
mode:
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>2026-07-28 13:40:11 +0900
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>2026-07-28 23:55:35 +0900
commitc00e735410d7269c0c655219cf42846da6b435c7 (patch)
tree77a023a6c8585ca308f3bd986125b0f6b267f060 /scripts/stackusage
parentd0d7dc1a70da6d65bef565f647c41febf3d881dd (diff)
downloadlinux-c00e735410d7269c0c655219cf42846da6b435c7.tar.gz
linux-c00e735410d7269c0c655219cf42846da6b435c7.zip
tracing/probes: Treating longer symbol name on event comparation
MAX_COMMON_HEAD_LEN (63) was used to allocate a temporary buffer for formatting command heads in trace_kprobe_match_command_head() and trace_uprobe_match_command_head(). However, the buffer size is too short for some longer symbols. Especially, with rust code, the symbol can be mangled and become very long. Refactor trace_kprobe_match_command_head() to perform direct string comparisons using strcmp() and strncmp(), eliminating the need for a temporary buffer and removing the MAX_COMMON_HEAD_LEN string length restriction on probe symbol names. For trace_uprobe_match_command_head(), since tu->filename is already matched via strncmp(), use a fixed 64-byte stack buffer solely for formatting offset and ref_ctr_offset (which requires at most 39 bytes). With all users converted, remove the MAX_COMMON_HEAD_LEN definition from trace_probe.h. Link: https://lore.kernel.org/all/178521361102.34226.9650586522488974115.stgit@devnote2/ Reported-by: Zhan Xusheng <zhanxusheng1024@gmail.com> Link: https://lore.kernel.org/all/20260724023317.624074-1-zhanxusheng@xiaomi.com/ Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions