X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Flttng-syscalls.c;h=03c521a1f76acc1fd0b67731d09e398c28bc4013;hb=refs%2Ftags%2Fv2.13.9;hp=d74851b7bc43224d1a5a1726a6dd32d0e8fabae3;hpb=a029f2a396b6da864697416a9e5f9b98a601356c;p=lttng-modules.git diff --git a/src/lttng-syscalls.c b/src/lttng-syscalls.c index d74851b7..03c521a1 100644 --- a/src/lttng-syscalls.c +++ b/src/lttng-syscalls.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "lttng-syscalls.h" @@ -43,7 +44,14 @@ /* in_compat_syscall appears in kernel 4.6. */ #ifndef in_compat_syscall - #define in_compat_syscall() is_compat_task() +# define in_compat_syscall() is_compat_task() +#endif + +/* in_x32_syscall appears in kernel 4.7. */ +#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(4,7,0)) +# ifdef CONFIG_X86_X32_ABI +# define in_x32_syscall() is_x32_task() +# endif #endif enum sc_type { @@ -271,6 +279,12 @@ void syscall_entry_event_probe(void *__data, struct pt_regs *regs, long id) const struct trace_syscall_entry *table, *entry; size_t table_len; +#ifdef CONFIG_X86_X32_ABI + if (in_x32_syscall()) { + /* x32 system calls are not supported. */ + return; + } +#endif if (unlikely(in_compat_syscall())) { struct lttng_syscall_filter *filter = chan->priv->parent.sc_filter; @@ -508,6 +522,12 @@ void syscall_exit_event_probe(void *__data, struct pt_regs *regs, long ret) size_t table_len; long id; +#ifdef CONFIG_X86_X32_ABI + if (in_x32_syscall()) { + /* x32 system calls are not supported. */ + return; + } +#endif id = syscall_get_nr(current, regs); if (unlikely(in_compat_syscall())) {