mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02: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:
parent
74bf97e9a8
commit
39263f986d
|
|
@ -4518,8 +4518,11 @@ static int t_show(struct seq_file *m, void *v)
|
|||
unsigned long direct;
|
||||
|
||||
direct = ftrace_find_rec_direct(rec->ip);
|
||||
if (direct)
|
||||
seq_printf(m, "\n\tdirect-->%pS", (void *)direct);
|
||||
if (direct) {
|
||||
seq_printf(m, "\n\tdirect%s-->%pS",
|
||||
ftrace_is_jmp(direct) ? "(jmp)" : "",
|
||||
(void *)ftrace_jmp_get(direct));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user