diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-25 16:04:12 -0500 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-03 15:09:20 -0500 |
| commit | 0a0e8cdf734ce723bfc4ca6032ffbc03ce17c642 (patch) | |
| tree | 25afe0e1fe4b686f6b36d5a5b978afb26986f576 | |
| parent | 75907d4d7bc5d79b82d1453d9689efc588de1b43 (diff) | |
old sigsuspend variants in kernel/signal.c
conditional on OLD_SIGSUSPEND/OLD_SIGSUSPEND3, depending on which
variety of that fossil is needed.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| -rw-r--r-- | arch/Kconfig | 10 | ||||
| -rw-r--r-- | include/linux/syscalls.h | 8 | ||||
| -rw-r--r-- | kernel/signal.c | 17 |
3 files changed, 35 insertions, 0 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index c612b5ccfd84..6b1df95ffefc 100644 --- a/arch/Kconfig +++ b/arch/Kconfig | |||
| @@ -387,4 +387,14 @@ config ODD_RT_SIGACTION | |||
| 387 | help | 387 | help |
| 388 | Architecture has unusual rt_sigaction(2) arguments | 388 | Architecture has unusual rt_sigaction(2) arguments |
| 389 | 389 | ||
| 390 | config OLD_SIGSUSPEND | ||
| 391 | bool | ||
| 392 | help | ||
| 393 | Architecture has old sigsuspend(2) syscall, of one-argument variety | ||
| 394 | |||
| 395 | config OLD_SIGSUSPEND3 | ||
| 396 | bool | ||
| 397 | help | ||
| 398 | Even weirder antique ABI - three-argument sigsuspend(2) | ||
| 399 | |||
| 390 | source "kernel/gcov/Kconfig" | 400 | source "kernel/gcov/Kconfig" |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 75defcd1c276..d2dd2f63d220 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -377,6 +377,14 @@ asmlinkage long sys_init_module(void __user *umod, unsigned long len, | |||
| 377 | asmlinkage long sys_delete_module(const char __user *name_user, | 377 | asmlinkage long sys_delete_module(const char __user *name_user, |
| 378 | unsigned int flags); | 378 | unsigned int flags); |
| 379 | 379 | ||
| 380 | #ifdef CONFIG_OLD_SIGSUSPEND | ||
| 381 | asmlinkage long sys_sigsuspend(old_sigset_t mask); | ||
| 382 | #endif | ||
| 383 | |||
| 384 | #ifdef CONFIG_OLD_SIGSUSPEND3 | ||
| 385 | asmlinkage long sys_sigsuspend(int unused1, int unused2, old_sigset_t mask); | ||
| 386 | #endif | ||
| 387 | |||
| 380 | #ifndef CONFIG_ODD_RT_SIGACTION | 388 | #ifndef CONFIG_ODD_RT_SIGACTION |
| 381 | asmlinkage long sys_rt_sigaction(int, | 389 | asmlinkage long sys_rt_sigaction(int, |
| 382 | const struct sigaction __user *, | 390 | const struct sigaction __user *, |
diff --git a/kernel/signal.c b/kernel/signal.c index 6cd3023cc66b..93fd4b83d866 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
| @@ -3454,6 +3454,23 @@ COMPAT_SYSCALL_DEFINE2(rt_sigsuspend, compat_sigset_t __user *, unewset, compat_ | |||
| 3454 | #endif | 3454 | #endif |
| 3455 | #endif | 3455 | #endif |
| 3456 | 3456 | ||
| 3457 | #ifdef CONFIG_OLD_SIGSUSPEND | ||
| 3458 | SYSCALL_DEFINE1(sigsuspend, old_sigset_t, mask) | ||
| 3459 | { | ||
| 3460 | sigset_t blocked; | ||
| 3461 | siginitset(&blocked, mask); | ||
| 3462 | return sigsuspend(&blocked); | ||
| 3463 | } | ||
| 3464 | #endif | ||
| 3465 | #ifdef CONFIG_OLD_SIGSUSPEND3 | ||
| 3466 | SYSCALL_DEFINE3(sigsuspend, int, unused1, int, unused2, old_sigset_t, mask) | ||
| 3467 | { | ||
| 3468 | sigset_t blocked; | ||
| 3469 | siginitset(&blocked, mask); | ||
| 3470 | return sigsuspend(&blocked); | ||
| 3471 | } | ||
| 3472 | #endif | ||
| 3473 | |||
| 3457 | __attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma) | 3474 | __attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma) |
| 3458 | { | 3475 | { |
| 3459 | return NULL; | 3476 | return NULL; |
