mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 10:01:39 -05:00
ftrace: Fix address for jmp mode in t_show()
The address from ftrace_find_rec_direct() is printed directly in t_show().
This can mislead symbol offsets if it has the "jmp" bit in the last bit.
Fix this by printing the address that returned by ftrace_jmp_get().
Link: https://patch.msgid.link/20251217030053.80343-1-dongml2@chinatelecom.cn
Fixes: 25e4e3565d ("ftrace: Introduce FTRACE_OPS_FL_JMP")
Signed-off-by: Menglong Dong <dongml2@chinatelecom.cn>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
This commit is contained in:
committed by
Steven Rostedt (Google)
parent
74bf97e9a8
commit
39263f986d
@@ -4518,8 +4518,11 @@ static int t_show(struct seq_file *m, void *v)
|
|||||||
unsigned long direct;
|
unsigned long direct;
|
||||||
|
|
||||||
direct = ftrace_find_rec_direct(rec->ip);
|
direct = ftrace_find_rec_direct(rec->ip);
|
||||||
if (direct)
|
if (direct) {
|
||||||
seq_printf(m, "\n\tdirect-->%pS", (void *)direct);
|
seq_printf(m, "\n\tdirect%s-->%pS",
|
||||||
|
ftrace_is_jmp(direct) ? "(jmp)" : "",
|
||||||
|
(void *)ftrace_jmp_get(direct));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user