Skip to content

Commit 6be9a8f

Browse files
Brian Gerstingomolnar
authored andcommitted
x86/signal/compat: Move sigaction_compat_abi() to signal_64.c
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>
1 parent f6e2a56 commit 6be9a8f

3 files changed

Lines changed: 13 additions & 16 deletions

File tree

arch/x86/kernel/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ obj-y += head$(BITS).o
4545
obj-y += ebda.o
4646
obj-y += platform-quirks.o
4747
obj-y += process_$(BITS).o signal.o signal_$(BITS).o
48-
obj-$(CONFIG_COMPAT) += signal_compat.o
4948
obj-y += traps.o idt.o irq.o irq_$(BITS).o dumpstack_$(BITS).o
5049
obj-y += time.o ioport.o dumpstack.o nmi.o
5150
obj-$(CONFIG_MODIFY_LDT_SYSCALL) += ldt.o

arch/x86/kernel/signal_64.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,19 @@ COMPAT_SYSCALL_DEFINE0(x32_rt_sigreturn)
382382
}
383383
#endif /* CONFIG_X86_X32_ABI */
384384

385+
#ifdef CONFIG_COMPAT
386+
void sigaction_compat_abi(struct k_sigaction *act, struct k_sigaction *oact)
387+
{
388+
if (!act)
389+
return;
390+
391+
if (in_ia32_syscall())
392+
act->sa.sa_flags |= SA_IA32_ABI;
393+
if (in_x32_syscall())
394+
act->sa.sa_flags |= SA_X32_ABI;
395+
}
396+
#endif /* CONFIG_COMPAT */
397+
385398
/*
386399
* If adding a new si_code, there is probably new data in
387400
* the siginfo. Make sure folks bumping the si_code

arch/x86/kernel/signal_compat.c

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)