Skip to content

Commit

Permalink
ARM: 8632/1: ftrace: fix syscall name matching
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Russell King <[email protected]>
  • Loading branch information
vwax authored and Russell King committed Jan 10, 2017
1 parent 7ce7d89 commit 270c8cf
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions arch/arm/include/asm/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,24 @@ static inline void *return_address(unsigned int level)

#define ftrace_return_address(n) return_address(n)

#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME

static inline bool arch_syscall_match_sym_name(const char *sym,
const char *name)
{
if (!strcmp(sym, "sys_mmap2"))
sym = "sys_mmap_pgoff";
else if (!strcmp(sym, "sys_statfs64_wrapper"))
sym = "sys_statfs64";
else if (!strcmp(sym, "sys_fstatfs64_wrapper"))
sym = "sys_fstatfs64";
else if (!strcmp(sym, "sys_arm_fadvise64_64"))
sym = "sys_fadvise64_64";

/* Ignore case since sym may start with "SyS" instead of "sys" */
return !strcasecmp(sym, name);
}

#endif /* ifndef __ASSEMBLY__ */

#endif /* _ASM_ARM_FTRACE */

0 comments on commit 270c8cf

Please sign in to comment.