Commit 0b7758aa authored by Naveen N. Rao's avatar Naveen N. Rao Committed by Michael Ellerman

powerpc/trace/syscalls: Update syscall name matching logic

On powerpc64 ABIv1, we are enabling syscall tracing for only ~20
syscalls. This is due to commit e145242e ("syscalls/core,
syscalls/x86: Clean up syscall stub naming convention") which has
changed the syscall entry wrapper prefix from "SyS" to "__se_sys".

Update the logic for ABIv1 to not just skip the initial dot, but also
the "__se_sys" prefix.

Fixes: commit e145242e ("syscalls/core, syscalls/x86: Clean up syscall stub naming convention")
Reported-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Signed-off-by: default avatarNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent c4ec1f03
...@@ -73,13 +73,9 @@ struct dyn_arch_ftrace { ...@@ -73,13 +73,9 @@ struct dyn_arch_ftrace {
#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME #define ARCH_HAS_SYSCALL_MATCH_SYM_NAME
static inline bool arch_syscall_match_sym_name(const char *sym, const char *name) static inline bool arch_syscall_match_sym_name(const char *sym, const char *name)
{ {
/* /* We need to skip past the initial dot, and the __se_sys alias */
* Compare the symbol name with the system call name. Skip the .sys or .SyS return !strcmp(sym + 1, name) ||
* prefix from the symbol name and the sys prefix from the system call name and (!strncmp(sym, ".__se_sys", 9) && !strcmp(sym + 6, name));
* just match the rest. This is only needed on ppc64 since symbol names on
* 32bit do not start with a period so the generic function will work.
*/
return !strcmp(sym + 4, name + 3);
} }
#endif #endif
#endif /* CONFIG_FTRACE_SYSCALLS && !__ASSEMBLY__ */ #endif /* CONFIG_FTRACE_SYSCALLS && !__ASSEMBLY__ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment