From 6be9a8f18fb2ea88d37a69f076f7011fc012ae1a Mon Sep 17 00:00:00 2001 From: Brian Gerst Date: Mon, 19 Dec 2022 14:39:04 -0500 Subject: x86/signal/compat: Move sigaction_compat_abi() to signal_64.c Also remove the now-empty signal_compat.c. Signed-off-by: Brian Gerst Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20221219193904.190220-3-brgerst@gmail.com Cc: Al Viro --- arch/x86/kernel/signal_64.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'arch/x86/kernel/signal_64.c') diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c index 9eea4e8f12ee..13a1e6083837 100644 --- a/arch/x86/kernel/signal_64.c +++ b/arch/x86/kernel/signal_64.c @@ -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 -- cgit v1.2.3