x86/signal/compat: Move sigaction_compat_abi() to signal_64.c
authorBrian Gerst <brgerst@gmail.com>
Mon, 19 Dec 2022 19:39:04 +0000 (14:39 -0500)
committerIngo Molnar <mingo@kernel.org>
Fri, 6 Jan 2023 03:16:02 +0000 (04:16 +0100)
Also remove the now-empty signal_compat.c.

Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20221219193904.190220-3-brgerst@gmail.com
Cc: Al Viro <viro@zeniv.linux.org.uk>
arch/x86/kernel/Makefile
arch/x86/kernel/signal_64.c
arch/x86/kernel/signal_compat.c [deleted file]

index 96d51bbc2bd420b95c31fd24f50a242a2c7be205..dd61752f4c966bf0db57abb92472f8c4ae4c0c82 100644 (file)
@@ -45,7 +45,6 @@ obj-y                 += head$(BITS).o
 obj-y                  += ebda.o
 obj-y                  += platform-quirks.o
 obj-y                  += process_$(BITS).o signal.o signal_$(BITS).o
-obj-$(CONFIG_COMPAT)   += signal_compat.o
 obj-y                  += traps.o idt.o irq.o irq_$(BITS).o dumpstack_$(BITS).o
 obj-y                  += time.o ioport.o dumpstack.o nmi.o
 obj-$(CONFIG_MODIFY_LDT_SYSCALL)       += ldt.o
index 9eea4e8f12ee08dfef64dbbdb53cf94c0ab1c13b..13a1e6083837a828f5a7932959e3fda39fae22eb 100644 (file)
@@ -382,6 +382,19 @@ badframe:
 }
 #endif /* CONFIG_X86_X32_ABI */
 
+#ifdef CONFIG_COMPAT
+void sigaction_compat_abi(struct k_sigaction *act, struct k_sigaction *oact)
+{
+       if (!act)
+               return;
+
+       if (in_ia32_syscall())
+               act->sa.sa_flags |= SA_IA32_ABI;
+       if (in_x32_syscall())
+               act->sa.sa_flags |= SA_X32_ABI;
+}
+#endif /* CONFIG_COMPAT */
+
 /*
 * If adding a new si_code, there is probably new data in
 * the siginfo.  Make sure folks bumping the si_code
diff --git a/arch/x86/kernel/signal_compat.c b/arch/x86/kernel/signal_compat.c
deleted file mode 100644 (file)
index c4e9b85..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <linux/compat.h>
-#include <linux/uaccess.h>
-#include <linux/ptrace.h>
-
-void sigaction_compat_abi(struct k_sigaction *act, struct k_sigaction *oact)
-{
-       if (!act)
-               return;
-
-       if (in_ia32_syscall())
-               act->sa.sa_flags |= SA_IA32_ABI;
-       if (in_x32_syscall())
-               act->sa.sa_flags |= SA_X32_ABI;
-}