Skip to content

Commit 5205f52

Browse files
vwaxgregkh
authored andcommitted
ARM: 8632/1: ftrace: fix syscall name matching
[ Upstream commit 270c8cf1cacc69cb8d99dea812f06067a45e4609 ] ARM has a few system calls (most notably mmap) for which the names of the functions which are referenced in the syscall table do not match the names of the syscall tracepoints. As a consequence of this, these tracepoints are not made available. Implement arch_syscall_match_sym_name to fix this and allow tracing even these system calls. Signed-off-by: Rabin Vincent <rabinv@axis.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 874f226 commit 5205f52

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

arch/arm/include/asm/ftrace.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,24 @@ static inline void *return_address(unsigned int level)
5454

5555
#define ftrace_return_address(n) return_address(n)
5656

57+
#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME
58+
59+
static inline bool arch_syscall_match_sym_name(const char *sym,
60+
const char *name)
61+
{
62+
if (!strcmp(sym, "sys_mmap2"))
63+
sym = "sys_mmap_pgoff";
64+
else if (!strcmp(sym, "sys_statfs64_wrapper"))
65+
sym = "sys_statfs64";
66+
else if (!strcmp(sym, "sys_fstatfs64_wrapper"))
67+
sym = "sys_fstatfs64";
68+
else if (!strcmp(sym, "sys_arm_fadvise64_64"))
69+
sym = "sys_fadvise64_64";
70+
71+
/* Ignore case since sym may start with "SyS" instead of "sys" */
72+
return !strcasecmp(sym, name);
73+
}
74+
5775
#endif /* ifndef __ASSEMBLY__ */
5876

5977
#endif /* _ASM_ARM_FTRACE */

0 commit comments

Comments
 (0)