From: Mathieu Desnoyers Date: Wed, 30 Nov 2022 20:41:02 +0000 (-0500) Subject: Explicitly skip tracing x32 system calls X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=5b5778b1c1ada0402d023301ed49e94661f2d23f;p=lttng-modules.git Explicitly skip tracing x32 system calls x86 x32 system calls are not supported by LTTng. They are currently not traced simply because their system call number is beyond the range of NR_compat_syscalls. However, this mostly happens by accident rather than by design. Enforce this with an explicit check for in_x32_syscall(), which clearly documents that those are not supported. Signed-off-by: Mathieu Desnoyers Change-Id: I1235c32c5cf03612bf9c36785cf7c4f8f49d292b --- diff --git a/src/lttng-syscalls.c b/src/lttng-syscalls.c index 2fb6eda3..9cb0537a 100644 --- a/src/lttng-syscalls.c +++ b/src/lttng-syscalls.c @@ -241,6 +241,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 = syscall_table->sc_filter; @@ -419,6 +425,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())) {