sanitize rt_sigaction() situation a bit
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 26 Nov 2012 04:12:10 +0000 (23:12 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 3 Feb 2013 20:09:18 +0000 (15:09 -0500)
Switch from __ARCH_WANT_SYS_RT_SIGACTION to opposite
(!CONFIG_ODD_RT_SIGACTION); the only two architectures that
need it are alpha and sparc.  The reason for use of CONFIG_...
instead of __ARCH_... is that it's needed only kernel-side
and doing it that way avoids a mess with include order on many
architectures.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/Kconfig
arch/alpha/Kconfig
arch/ia64/include/asm/unistd.h
arch/powerpc/include/asm/syscalls.h
arch/sparc/Kconfig
arch/sparc/kernel/sys_sparc_32.c
arch/x86/um/shared/sysdep/syscalls_32.h
arch/xtensa/include/asm/syscall.h
include/asm-generic/syscalls.h
include/linux/syscalls.h
kernel/signal.c

index 7f8f281f2585e25ee74853bfb88183514ce3d5ca..6e4c32a5a3586934dfa546f362a72ecbe6158625 100644 (file)
@@ -373,4 +373,9 @@ config CLONE_BACKWARDS2
        help
          Architecture has the first two arguments of clone(2) swapped.
 
+config ODD_RT_SIGACTION
+       bool
+       help
+         Architecture has unusual rt_sigaction(2) arguments
+
 source "kernel/gcov/Kconfig"
index 9d5904cc7712fbdd64ce3d682617d5f31be6b268..8696c03a9d73a05166de33b8e057f447053fe9d6 100644 (file)
@@ -23,6 +23,7 @@ config ALPHA
        select HAVE_MOD_ARCH_SPECIFIC
        select MODULES_USE_ELF_RELA
        select GENERIC_SIGALTSTACK
+       select ODD_RT_SIGACTION
        help
          The Alpha is a 64-bit general-purpose processor designed and
          marketed by the Digital Equipment Corporation of blessed memory,
index c3cc42a15af157b14fc7fd55da74f75d39d21616..bfbb109458bef89f021ae1daaa3adbcb4c32b588 100644 (file)
@@ -49,10 +49,6 @@ asmlinkage unsigned long sys_mmap2(
 struct pt_regs;
 struct sigaction;
 asmlinkage long sys_ia64_pipe(void);
-asmlinkage long sys_rt_sigaction(int sig,
-                                const struct sigaction __user *act,
-                                struct sigaction __user *oact,
-                                size_t sigsetsize);
 
 /*
  * "Conditional" syscalls
index b5308d3e6d391fc36568f95e2a64aeec865e3a68..5c51659e61d50efd79b1f72199d6a2976129576c 100644 (file)
@@ -19,9 +19,6 @@ asmlinkage unsigned long sys_mmap2(unsigned long addr, size_t len,
                unsigned long fd, unsigned long pgoff);
 asmlinkage long sys_pipe(int __user *fildes);
 asmlinkage long sys_pipe2(int __user *fildes, int flags);
-asmlinkage long sys_rt_sigaction(int sig,
-               const struct sigaction __user *act,
-               struct sigaction __user *oact, size_t sigsetsize);
 asmlinkage long ppc64_personality(unsigned long personality);
 asmlinkage int ppc_rtas(struct rtas_args __user *uargs);
 asmlinkage time_t sys64_time(time_t __user * tloc);
index 9f2edb5c555179de8d00ee5d2031546df35f8a9d..89dde2f0653a5058cf5060bcb5b611422be22cc7 100644 (file)
@@ -41,6 +41,7 @@ config SPARC
        select GENERIC_STRNCPY_FROM_USER
        select GENERIC_STRNLEN_USER
        select MODULES_USE_ELF_RELA
+       select ODD_RT_SIGACTION
 
 config SPARC32
        def_bool !64BIT
index 2da0bdcae52f765e0e7e021082064bc99e6e0ace..cdd2d7035930170d54feab1cb72699509984ae10 100644 (file)
@@ -197,12 +197,11 @@ sparc_sigaction (int sig, const struct old_sigaction __user *act,
        return ret;
 }
 
-asmlinkage long
-sys_rt_sigaction(int sig,
-                const struct sigaction __user *act,
-                struct sigaction __user *oact,
-                void __user *restorer,
-                size_t sigsetsize)
+SYSCALL_DEFINE5(rt_sigaction, int, sig,
+                const struct sigaction __user *, act,
+                struct sigaction __user *, oact,
+                void __user *, restorer,
+                size_t, sigsetsize)
 {
        struct k_sigaction new_ka, old_ka;
        int ret;
index 8436079be914d3cdc4fa82faa4b5a4f208543308..68fd2cf526fd7e47f0dd823db12e8389b01ed6b9 100644 (file)
@@ -8,11 +8,6 @@
 
 typedef long syscall_handler_t(struct pt_regs);
 
-/* Not declared on x86, incompatible declarations on x86_64, so these have
- * to go here rather than in sys_call_table.c
- */
-extern syscall_handler_t sys_rt_sigaction;
-
 extern syscall_handler_t *sys_call_table[];
 
 #define EXECUTE_SYSCALL(syscall, regs) \
index 8d5e47fad0958160abcc117c9f5f1da3c7c5ae50..6cf7c6c07a84f5c913a2217eb4405be9fc367335 100644 (file)
@@ -9,15 +9,10 @@
  */
 
 struct pt_regs;
-struct sigaction;
 asmlinkage long xtensa_ptrace(long, long, long, long);
 asmlinkage long xtensa_sigreturn(struct pt_regs*);
 asmlinkage long xtensa_rt_sigreturn(struct pt_regs*);
 asmlinkage long xtensa_sigaltstack(struct pt_regs *regs);
-asmlinkage long sys_rt_sigaction(int,
-                                const struct sigaction __user *,
-                                struct sigaction __user *,
-                                size_t);
 asmlinkage long xtensa_shmat(int, char __user *, int);
 asmlinkage long xtensa_fadvise64_64(int, int,
                                    unsigned long long, unsigned long long);
index 1db51b8524e9fb86fcc71e797f95a6518c259bfc..6a8d620a84d48e180fd000b8b8d06a1e2a08b176 100644 (file)
@@ -36,9 +36,4 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs);
 asmlinkage long sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize);
 #endif
 
-#ifndef sys_rt_sigaction
-asmlinkage long sys_rt_sigaction(int sig, const struct sigaction __user *act,
-                        struct sigaction __user *oact, size_t sigsetsize);
-#endif
-
 #endif /* __ASM_GENERIC_SYSCALLS_H */
index 45e2db2702557c1ddb57700671205546868cdc45..75defcd1c276425966a2298ee99eb325b2535b80 100644 (file)
@@ -377,6 +377,12 @@ asmlinkage long sys_init_module(void __user *umod, unsigned long len,
 asmlinkage long sys_delete_module(const char __user *name_user,
                                unsigned int flags);
 
+#ifndef CONFIG_ODD_RT_SIGACTION
+asmlinkage long sys_rt_sigaction(int,
+                                const struct sigaction __user *,
+                                struct sigaction __user *,
+                                size_t);
+#endif
 asmlinkage long sys_rt_sigprocmask(int how, sigset_t __user *set,
                                sigset_t __user *oset, size_t sigsetsize);
 asmlinkage long sys_rt_sigpending(sigset_t __user *set, size_t sigsetsize);
index 53cd5c4d1172ff3e8696db61b57fbcd9c4e74373..00cd1ce998beb3ff94c2cb91b09a1f88904c408e 100644 (file)
@@ -3231,7 +3231,7 @@ SYSCALL_DEFINE3(sigprocmask, int, how, old_sigset_t __user *, nset,
 }
 #endif /* __ARCH_WANT_SYS_SIGPROCMASK */
 
-#ifdef __ARCH_WANT_SYS_RT_SIGACTION
+#ifndef CONFIG_ODD_RT_SIGACTION
 /**
  *  sys_rt_sigaction - alter an action taken by a process
  *  @sig: signal to be sent
@@ -3265,7 +3265,7 @@ SYSCALL_DEFINE4(rt_sigaction, int, sig,
 out:
        return ret;
 }
-#endif /* __ARCH_WANT_SYS_RT_SIGACTION */
+#endif /* !CONFIG_ODD_RT_SIGACTION */
 
 #ifdef __ARCH_WANT_SYS_SGETMASK
 
This page took 0.033458 seconds and 5 git commands to generate.