diff options
| -rw-r--r-- | arch/x86/include/asm/ftrace.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/arch/x86/include/asm/ftrace.h b/arch/x86/include/asm/ftrace.h index 09ad88572746..cc8f8fcf9b4a 100644 --- a/arch/x86/include/asm/ftrace.h +++ b/arch/x86/include/asm/ftrace.h | |||
| @@ -46,7 +46,21 @@ int ftrace_int3_handler(struct pt_regs *regs); | |||
| 46 | #endif /* CONFIG_FUNCTION_TRACER */ | 46 | #endif /* CONFIG_FUNCTION_TRACER */ |
| 47 | 47 | ||
| 48 | 48 | ||
| 49 | #if !defined(__ASSEMBLY__) && !defined(COMPILE_OFFSETS) | 49 | #ifndef __ASSEMBLY__ |
| 50 | |||
| 51 | #define ARCH_HAS_SYSCALL_MATCH_SYM_NAME | ||
| 52 | static inline bool arch_syscall_match_sym_name(const char *sym, const char *name) | ||
| 53 | { | ||
| 54 | /* | ||
| 55 | * Compare the symbol name with the system call name. Skip the | ||
| 56 | * "__x64_sys", "__ia32_sys" or simple "sys" prefix. | ||
| 57 | */ | ||
| 58 | return !strcmp(sym + 3, name + 3) || | ||
| 59 | (!strncmp(sym, "__x64_", 6) && !strcmp(sym + 9, name + 3)) || | ||
| 60 | (!strncmp(sym, "__ia32_", 7) && !strcmp(sym + 10, name + 3)); | ||
| 61 | } | ||
| 62 | |||
| 63 | #ifndef COMPILE_OFFSETS | ||
| 50 | 64 | ||
| 51 | #if defined(CONFIG_FTRACE_SYSCALLS) && defined(CONFIG_IA32_EMULATION) | 65 | #if defined(CONFIG_FTRACE_SYSCALLS) && defined(CONFIG_IA32_EMULATION) |
| 52 | #include <asm/compat.h> | 66 | #include <asm/compat.h> |
| @@ -67,6 +81,7 @@ static inline bool arch_trace_is_compat_syscall(struct pt_regs *regs) | |||
| 67 | return false; | 81 | return false; |
| 68 | } | 82 | } |
| 69 | #endif /* CONFIG_FTRACE_SYSCALLS && CONFIG_IA32_EMULATION */ | 83 | #endif /* CONFIG_FTRACE_SYSCALLS && CONFIG_IA32_EMULATION */ |
| 70 | #endif /* !__ASSEMBLY__ && !COMPILE_OFFSETS */ | 84 | #endif /* !COMPILE_OFFSETS */ |
| 85 | #endif /* !__ASSEMBLY__ */ | ||
| 71 | 86 | ||
| 72 | #endif /* _ASM_X86_FTRACE_H */ | 87 | #endif /* _ASM_X86_FTRACE_H */ |
