.. | .. |
---|
11 | 11 | #define MCOUNT_RETURN_FIXUP 18 |
---|
12 | 12 | #endif |
---|
13 | 13 | |
---|
| 14 | +#define HAVE_FUNCTION_GRAPH_RET_ADDR_PTR |
---|
| 15 | + |
---|
14 | 16 | #ifndef __ASSEMBLY__ |
---|
15 | 17 | |
---|
| 18 | +#ifdef CONFIG_CC_IS_CLANG |
---|
| 19 | +/* https://bugs.llvm.org/show_bug.cgi?id=41424 */ |
---|
| 20 | +#define ftrace_return_address(n) 0UL |
---|
| 21 | +#else |
---|
16 | 22 | #define ftrace_return_address(n) __builtin_return_address(n) |
---|
| 23 | +#endif |
---|
17 | 24 | |
---|
18 | 25 | void _mcount(void); |
---|
19 | 26 | void ftrace_caller(void); |
---|
.. | .. |
---|
82 | 89 | #endif |
---|
83 | 90 | } |
---|
84 | 91 | |
---|
| 92 | +/* |
---|
| 93 | + * Even though the system call numbers are identical for s390/s390x a |
---|
| 94 | + * different system call table is used for compat tasks. This may lead |
---|
| 95 | + * to e.g. incorrect or missing trace event sysfs files. |
---|
| 96 | + * Therefore simply do not trace compat system calls at all. |
---|
| 97 | + * See kernel/trace/trace_syscalls.c. |
---|
| 98 | + */ |
---|
| 99 | +#define ARCH_TRACE_IGNORE_COMPAT_SYSCALLS |
---|
| 100 | +static inline bool arch_trace_is_compat_syscall(struct pt_regs *regs) |
---|
| 101 | +{ |
---|
| 102 | + return is_compat_task(); |
---|
| 103 | +} |
---|
| 104 | + |
---|
| 105 | +#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME |
---|
| 106 | +static inline bool arch_syscall_match_sym_name(const char *sym, |
---|
| 107 | + const char *name) |
---|
| 108 | +{ |
---|
| 109 | + /* |
---|
| 110 | + * Skip __s390_ and __s390x_ prefix - due to compat wrappers |
---|
| 111 | + * and aliasing some symbols of 64 bit system call functions |
---|
| 112 | + * may get the __s390_ prefix instead of the __s390x_ prefix. |
---|
| 113 | + */ |
---|
| 114 | + return !strcmp(sym + 7, name) || !strcmp(sym + 8, name); |
---|
| 115 | +} |
---|
| 116 | + |
---|
85 | 117 | #endif /* __ASSEMBLY__ */ |
---|
86 | 118 | #endif /* _ASM_S390_FTRACE_H */ |
---|