]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tracing: Fix function name for trampoline
authorTatsuya S <tatsuya.s2862@gmail.com>
Mon, 21 Oct 2024 07:14:53 +0000 (07:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:04:03 +0000 (20:04 +0100)
commit7214d3a64e6ec3b318d083ba7a12c5389d4ff960
tree79152015a32e45503128962b5f61db26770ef40d
parentd58ed5c2813c0291108ee459b823bddf0296a5e7
tracing: Fix function name for trampoline

[ Upstream commit 6ce5a6f0a07d37cc377df08a8d8a9c283420f323 ]

The issue that unrelated function name is shown on stack trace like
following even though it should be trampoline code address is caused by
the creation of trampoline code in the area where .init.text section
of module was freed after module is loaded.

bash-1344    [002] .....    43.644608: <stack trace>
=> (MODULE INIT FUNCTION)
=> vfs_write
=> ksys_write
=> do_syscall_64
=> entry_SYSCALL_64_after_hwframe

To resolve this, when function address of stack trace entry is in
trampoline, output without looking up symbol name.

Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/20241021071454.34610-2-tatsuya.s2862@gmail.com
Signed-off-by: Tatsuya S <tatsuya.s2862@gmail.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/trace/trace.c
kernel/trace/trace.h
kernel/trace/trace_output.c