sys_sgetmask/sys_ssetmask: add CONFIG_SGETMASK_SYSCALL
authorFabian Frederick <fabf@skynet.be>
Wed, 4 Jun 2014 23:11:12 +0000 (16:11 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Jun 2014 23:54:14 +0000 (16:54 -0700)
sys_sgetmask and sys_ssetmask are obsolete system calls no longer
supported in libc.

This patch replaces architecture related __ARCH_WANT_SYS_SGETMAX by expert
mode configuration.That option is enabled by default for those
architectures.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Steven Miao <realmz6@gmail.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Greg Ungerer <gerg@uclinux.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 files changed:
arch/blackfin/include/asm/unistd.h
arch/cris/include/asm/unistd.h
arch/frv/include/asm/unistd.h
arch/m68k/include/asm/unistd.h
arch/microblaze/include/asm/unistd.h
arch/mips/include/asm/unistd.h
arch/mn10300/include/asm/unistd.h
arch/parisc/include/asm/unistd.h
arch/powerpc/include/asm/unistd.h
arch/sh/include/asm/unistd.h
arch/sparc/include/asm/unistd.h
arch/x86/include/asm/unistd.h
init/Kconfig
kernel/signal.c
kernel/sys_ni.c

index c35414bdf7bd3ddad8ff3371468e70ce95ab8fd6..c8c8ff9eff61e613ee8fff6e72d3c7b5b07386ed 100644 (file)
@@ -12,7 +12,6 @@
 #define __ARCH_WANT_SYS_ALARM
 #define __ARCH_WANT_SYS_GETHOSTNAME
 #define __ARCH_WANT_SYS_PAUSE
-#define __ARCH_WANT_SYS_SGETMASK
 #define __ARCH_WANT_SYS_TIME
 #define __ARCH_WANT_SYS_FADVISE64
 #define __ARCH_WANT_SYS_GETPGRP
index 5cc7d1991e482bf0e3eef50e598877595c15b69a..0f40fed1ba25852d0d681749ad07d95b4bcca3fa 100644 (file)
@@ -15,7 +15,6 @@
 #define __ARCH_WANT_SYS_GETHOSTNAME
 #define __ARCH_WANT_SYS_IPC
 #define __ARCH_WANT_SYS_PAUSE
-#define __ARCH_WANT_SYS_SGETMASK
 #define __ARCH_WANT_SYS_SIGNAL
 #define __ARCH_WANT_SYS_TIME
 #define __ARCH_WANT_SYS_UTIME
index 70ec7293dce78f56e7e3400dc8e52edf7ab8c0f5..17b5df8fc28a1a932ba530565adfdcde63eff170 100644 (file)
@@ -13,7 +13,6 @@
 /* #define __ARCH_WANT_SYS_GETHOSTNAME */
 #define __ARCH_WANT_SYS_IPC
 #define __ARCH_WANT_SYS_PAUSE
-/* #define __ARCH_WANT_SYS_SGETMASK */
 /* #define __ARCH_WANT_SYS_SIGNAL */
 #define __ARCH_WANT_SYS_TIME
 #define __ARCH_WANT_SYS_UTIME
index 33afa56ad47aecd6620bc150eea042705cc85d3e..1fcdd344c7ad5797605ddbb9ee98bcde3461c295 100644 (file)
@@ -13,7 +13,6 @@
 #define __ARCH_WANT_SYS_GETHOSTNAME
 #define __ARCH_WANT_SYS_IPC
 #define __ARCH_WANT_SYS_PAUSE
-#define __ARCH_WANT_SYS_SGETMASK
 #define __ARCH_WANT_SYS_SIGNAL
 #define __ARCH_WANT_SYS_TIME
 #define __ARCH_WANT_SYS_UTIME
index b14232b6878fca5889e4f91814acaa28f1603170..fd56a8f66489dc68264ac8f70cc70863c6f25380 100644 (file)
@@ -19,7 +19,6 @@
 #define __ARCH_WANT_SYS_ALARM
 #define __ARCH_WANT_SYS_GETHOSTNAME
 #define __ARCH_WANT_SYS_PAUSE
-#define __ARCH_WANT_SYS_SGETMASK
 #define __ARCH_WANT_SYS_SIGNAL
 #define __ARCH_WANT_SYS_TIME
 #define __ARCH_WANT_SYS_UTIME
index 413d6c612bec059e0e5579d3167d67e6bb8e7ad0..e55813029d5a2fcf2c67c428a4ff4eea94b44ecb 100644 (file)
@@ -29,7 +29,6 @@
 #define __ARCH_WANT_SYS_GETHOSTNAME
 #define __ARCH_WANT_SYS_IPC
 #define __ARCH_WANT_SYS_PAUSE
-#define __ARCH_WANT_SYS_SGETMASK
 #define __ARCH_WANT_SYS_UTIME
 #define __ARCH_WANT_SYS_WAITPID
 #define __ARCH_WANT_SYS_SOCKETCALL
index 9d4e2d1ef90edcec1e37a449440d932bd23403a9..0522468f488b7b65880869bd8e8e163f0ab16329 100644 (file)
@@ -26,7 +26,6 @@
 #define __ARCH_WANT_SYS_GETHOSTNAME
 #define __ARCH_WANT_SYS_IPC
 #define __ARCH_WANT_SYS_PAUSE
-#define __ARCH_WANT_SYS_SGETMASK
 #define __ARCH_WANT_SYS_SIGNAL
 #define __ARCH_WANT_SYS_TIME
 #define __ARCH_WANT_SYS_UTIME
index 74d835820ee7bb16e72009b240844a804552b239..5f4c68daa261727c614392346926d22fbef7eaa6 100644 (file)
@@ -145,7 +145,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5)       \
 #define __ARCH_WANT_SYS_ALARM
 #define __ARCH_WANT_SYS_GETHOSTNAME
 #define __ARCH_WANT_SYS_PAUSE
-#define __ARCH_WANT_SYS_SGETMASK
 #define __ARCH_WANT_SYS_SIGNAL
 #define __ARCH_WANT_SYS_TIME
 #define __ARCH_WANT_COMPAT_SYS_TIME
index 9b892bbd9d843ec4d2af43f788a557b9e35bcec5..5ce5552ab9f5ca24fe479bfd81ea4a915a478a90 100644 (file)
@@ -29,7 +29,6 @@
 #define __ARCH_WANT_SYS_GETHOSTNAME
 #define __ARCH_WANT_SYS_IPC
 #define __ARCH_WANT_SYS_PAUSE
-#define __ARCH_WANT_SYS_SGETMASK
 #define __ARCH_WANT_SYS_SIGNAL
 #define __ARCH_WANT_SYS_TIME
 #define __ARCH_WANT_SYS_UTIME
index e77816c4b9bc4de14d75f7a8ce9cf5c2bc466b02..126fe8340b22da8547c4374a2a9c077d658f9f30 100644 (file)
@@ -11,7 +11,6 @@
 # define __ARCH_WANT_SYS_GETHOSTNAME
 # define __ARCH_WANT_SYS_IPC
 # define __ARCH_WANT_SYS_PAUSE
-# define __ARCH_WANT_SYS_SGETMASK
 # define __ARCH_WANT_SYS_SIGNAL
 # define __ARCH_WANT_SYS_TIME
 # define __ARCH_WANT_SYS_UTIME
index dfa53fdd5cbc8ec8d3bde130391b9d07972a3dca..0aac1e8f29683a7384058405c3ea241f4d33179e 100644 (file)
@@ -25,7 +25,6 @@
 #define __ARCH_WANT_SYS_ALARM
 #define __ARCH_WANT_SYS_GETHOSTNAME
 #define __ARCH_WANT_SYS_PAUSE
-#define __ARCH_WANT_SYS_SGETMASK
 #define __ARCH_WANT_SYS_SIGNAL
 #define __ARCH_WANT_SYS_TIME
 #define __ARCH_WANT_SYS_UTIME
index 3f556c6a015769a1a53a2615e3a0cf26da1725a3..2b19caa4081c7f49c8841d1d86d6571efe47a12d 100644 (file)
@@ -41,7 +41,6 @@
 # define __ARCH_WANT_SYS_OLD_GETRLIMIT
 # define __ARCH_WANT_SYS_OLD_UNAME
 # define __ARCH_WANT_SYS_PAUSE
-# define __ARCH_WANT_SYS_SGETMASK
 # define __ARCH_WANT_SYS_SIGNAL
 # define __ARCH_WANT_SYS_SIGPENDING
 # define __ARCH_WANT_SYS_SIGPROCMASK
index ce034ad4a162d16aaf8c824675a50d0cfaf3a6d4..9d76b99af1b95ce5460b4380e4f27ef0532fdade 100644 (file)
@@ -1313,6 +1313,16 @@ config UID16
        help
          This enables the legacy 16-bit UID syscall wrappers.
 
+config SGETMASK_SYSCALL
+       bool "sgetmask/ssetmask syscalls support" if EXPERT
+       def_bool PARISC || MN10300 || BLACKFIN || M68K || PPC || MIPS || X86 || SPARC || CRIS || MICROBLAZE || SUPERH
+       ---help---
+         sys_sgetmask and sys_ssetmask are obsolete system calls
+         no longer supported in libc but still enabled by default in some
+         architectures.
+
+         If unsure, leave the default option here.
+
 config SYSFS_SYSCALL
        bool "Sysfs syscall support" if EXPERT
        default y
index 6ea13c09ae56027521d41f75430e8401cb32ad93..6e600aaa2af45b3074a34856582056d010f560bd 100644 (file)
@@ -3496,7 +3496,7 @@ COMPAT_SYSCALL_DEFINE3(sigaction, int, sig,
 }
 #endif
 
-#ifdef __ARCH_WANT_SYS_SGETMASK
+#ifdef CONFIG_SGETMASK_SYSCALL
 
 /*
  * For backwards compatibility.  Functionality superseded by sigprocmask.
@@ -3517,7 +3517,7 @@ SYSCALL_DEFINE1(ssetmask, int, newmask)
 
        return old;
 }
-#endif /* __ARCH_WANT_SGETMASK */
+#endif /* CONFIG_SGETMASK_SYSCALL */
 
 #ifdef __ARCH_WANT_SYS_SIGNAL
 /*
index bc8d1b74a6b95e5b247cf90c0ad5d8cd937745e2..36441b51b5dff20bb63792d3ad7ff7e0d30908bf 100644 (file)
@@ -135,6 +135,8 @@ cond_syscall(sys_setresgid16);
 cond_syscall(sys_setresuid16);
 cond_syscall(sys_setreuid16);
 cond_syscall(sys_setuid16);
+cond_syscall(sys_sgetmask);
+cond_syscall(sys_ssetmask);
 cond_syscall(sys_vm86old);
 cond_syscall(sys_vm86);
 cond_syscall(sys_ipc);