From: Jérémie Galarneau Date: Wed, 9 Nov 2022 22:20:06 +0000 (-0500) Subject: Fix: define old_sigaction as compat_old_sigaction in x86-32 compat X-Git-Url: http://git.lttng.org/?p=lttng-modules.git;a=commitdiff_plain;h=cae34aadcc5ac23148182c5419214fa013c7eb60 Fix: define old_sigaction as compat_old_sigaction in x86-32 compat In a follow-up patch which updates the instrumentation for x86-32, the instrumentation of the old_sigaction() syscall would fail to build when targeting a 64-bit kernel. In that context, old_sigaction becomes compat_old_sigaction which is a syscall that can be disabled (it was superseded by rt_sigaction a long time ago). Signed-off-by: Jérémie Galarneau Signed-off-by: Mathieu Desnoyers Change-Id: I633c80e03947a81d1b5c93f8f95a61feb7c34884 --- diff --git a/include/instrumentation/syscalls/headers/x86-32-syscalls_pointers_override.h b/include/instrumentation/syscalls/headers/x86-32-syscalls_pointers_override.h index e93213f6..5689bda4 100644 --- a/include/instrumentation/syscalls/headers/x86-32-syscalls_pointers_override.h +++ b/include/instrumentation/syscalls/headers/x86-32-syscalls_pointers_override.h @@ -11,6 +11,24 @@ # define OVERRIDE_32_chown16 # endif +#ifdef CONFIG_X86_64 +#if CONFIG_COMPAT_OLD_SIGACTION +/* + * From the point of view of the 64-bit ABI, old_sigaction + * becomes compat_old_sigaction. + */ +#define old_sigaction compat_old_sigaction +#else /* CONFIG_COMPAT_OLD_SIGACTION */ +/* + * The target 64-bit kernel does not enable the support for + * the 32-bit compat version of OLD_SIGACTION. Defining + * OVERRIDE_32_sigaction ensures we don't build a tracepoint + * for this syscall. + */ +#define OVERRIDE_32_sigaction +#endif /* CONFIG_COMPAT_OLD_SIGACTION */ +#endif + #define OVERRIDE_32_pipe #define OVERRIDE_64_pipe SC_LTTNG_TRACEPOINT_EVENT(pipe,