Skip to content

Commit ad050d2

Browse files
mjeansonmpe
authored andcommitted
powerpc/ftrace: fix syscall tracing on PPC64_ELF_ABI_V1
In v5.7 the powerpc syscall entry/exit logic was rewritten in C, on PPC64_ELF_ABI_V1 this resulted in the symbols in the syscall table changing from their dot prefixed variant to the non-prefixed ones. Since ftrace prefixes a dot to the syscall names when matching them to build its syscall event list, this resulted in no syscall events being available. Remove the PPC64_ELF_ABI_V1 specific version of arch_syscall_match_sym_name to have the same behavior across all powerpc variants. Fixes: 68b3458 ("powerpc/64/sycall: Implement syscall entry/exit logic in C") Cc: [email protected] # v5.7+ Signed-off-by: Michael Jeanson <[email protected]> Reviewed-by: Mathieu Desnoyers <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 7cd882d commit ad050d2

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

arch/powerpc/include/asm/ftrace.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,6 @@ void ftrace_graph_func(unsigned long ip, unsigned long parent_ip,
7171
* those.
7272
*/
7373
#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME
74-
#ifdef CONFIG_PPC64_ELF_ABI_V1
75-
static inline bool arch_syscall_match_sym_name(const char *sym, const char *name)
76-
{
77-
/* We need to skip past the initial dot, and the __se_sys alias */
78-
return !strcmp(sym + 1, name) ||
79-
(!strncmp(sym, ".__se_sys", 9) && !strcmp(sym + 6, name)) ||
80-
(!strncmp(sym, ".ppc_", 5) && !strcmp(sym + 5, name + 4)) ||
81-
(!strncmp(sym, ".ppc32_", 7) && !strcmp(sym + 7, name + 4)) ||
82-
(!strncmp(sym, ".ppc64_", 7) && !strcmp(sym + 7, name + 4));
83-
}
84-
#else
8574
static inline bool arch_syscall_match_sym_name(const char *sym, const char *name)
8675
{
8776
return !strcmp(sym, name) ||
@@ -90,7 +79,6 @@ static inline bool arch_syscall_match_sym_name(const char *sym, const char *name
9079
(!strncmp(sym, "ppc32_", 6) && !strcmp(sym + 6, name + 4)) ||
9180
(!strncmp(sym, "ppc64_", 6) && !strcmp(sym + 6, name + 4));
9281
}
93-
#endif /* CONFIG_PPC64_ELF_ABI_V1 */
9482
#endif /* CONFIG_FTRACE_SYSCALLS */
9583

9684
#if defined(CONFIG_PPC64) && defined(CONFIG_FUNCTION_TRACER)

0 commit comments

Comments
 (0)