Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 21 Dec 2012 02:05:28 +0000 (18:05 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 21 Dec 2012 02:05:28 +0000 (18:05 -0800)
Pull signal handling cleanups from Al Viro:
 "sigaltstack infrastructure + conversion for x86, alpha and um,
  COMPAT_SYSCALL_DEFINE infrastructure.

  Note that there are several conflicts between "unify
  SS_ONSTACK/SS_DISABLE definitions" and UAPI patches in mainline;
  resolution is trivial - just remove definitions of SS_ONSTACK and
  SS_DISABLED from arch/*/uapi/asm/signal.h; they are all identical and
  include/uapi/linux/signal.h contains the unified variant."

Fixed up conflicts as per Al.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal:
  alpha: switch to generic sigaltstack
  new helpers: __save_altstack/__compat_save_altstack, switch x86 and um to those
  generic compat_sys_sigaltstack()
  introduce generic sys_sigaltstack(), switch x86 and um to it
  new helper: compat_user_stack_pointer()
  new helper: restore_altstack()
  unify SS_ONSTACK/SS_DISABLE definitions
  new helper: current_user_stack_pointer()
  missing user_stack_pointer() instances
  Bury the conditionals from kernel_thread/kernel_execve series
  COMPAT_SYSCALL_DEFINE: infrastructure

51 files changed:
1  2 
arch/Kconfig
arch/alpha/include/asm/ptrace.h
arch/alpha/include/asm/unistd.h
arch/alpha/include/uapi/asm/signal.h
arch/arm/Kconfig
arch/arm64/Kconfig
arch/arm64/include/asm/unistd.h
arch/avr32/Kconfig
arch/blackfin/include/asm/ptrace.h
arch/blackfin/include/asm/unistd.h
arch/cris/include/asm/ptrace.h
arch/cris/include/asm/unistd.h
arch/cris/include/uapi/asm/signal.h
arch/h8300/Kconfig
arch/h8300/include/asm/ptrace.h
arch/h8300/include/asm/unistd.h
arch/h8300/include/uapi/asm/signal.h
arch/m32r/include/asm/ptrace.h
arch/m32r/include/asm/unistd.h
arch/m32r/include/uapi/asm/signal.h
arch/microblaze/include/asm/ptrace.h
arch/microblaze/include/asm/unistd.h
arch/mips/Kconfig
arch/openrisc/Kconfig
arch/powerpc/include/asm/unistd.h
arch/s390/Kconfig
arch/score/include/asm/ptrace.h
arch/score/include/uapi/asm/unistd.h
arch/sparc/include/asm/unistd.h
arch/tile/include/asm/ptrace.h
arch/tile/include/asm/unistd.h
arch/x86/Kconfig
arch/x86/include/asm/ptrace.h
arch/x86/include/asm/unistd.h
arch/x86/include/uapi/asm/signal.h
arch/x86/kernel/entry_64.S
arch/x86/kernel/signal.c
arch/x86/syscalls/syscall_32.tbl
arch/x86/syscalls/syscall_64.tbl
arch/x86/um/Kconfig
arch/xtensa/Kconfig
arch/xtensa/include/asm/ptrace.h
fs/exec.c
include/linux/binfmts.h
include/linux/compat.h
include/linux/ptrace.h
include/linux/sched.h
include/linux/syscalls.h
init/main.c
kernel/fork.c
kernel/signal.c

diff --cc arch/Kconfig
Simple merge
Simple merge
Simple merge
index 965bbfa59c658f7d0d6c6e7a4c116e05174d4bc5,0000000000000000000000000000000000000000..dd4ca4bcbb4a0488cfd6c42334cb8dae97e2b16d
mode 100644,000000..100644
--- /dev/null
@@@ -1,135 -1,0 +1,129 @@@
- /* 
-  * sigaltstack controls
-  */
- #define SS_ONSTACK    1
- #define SS_DISABLE    2
 +#ifndef _UAPI_ASMAXP_SIGNAL_H
 +#define _UAPI_ASMAXP_SIGNAL_H
 +
 +#include <linux/types.h>
 +
 +/* Avoid too many header ordering problems.  */
 +struct siginfo;
 +
 +#ifndef __KERNEL__
 +/* Here we must cater to libcs that poke about in kernel headers.  */
 +
 +#define NSIG          32
 +typedef unsigned long sigset_t;
 +
 +#endif /* __KERNEL__ */
 +
 +
 +/*
 + * Linux/AXP has different signal numbers that Linux/i386: I'm trying
 + * to make it OSF/1 binary compatible, at least for normal binaries.
 + */
 +#define SIGHUP                 1
 +#define SIGINT                 2
 +#define SIGQUIT                3
 +#define SIGILL                 4
 +#define SIGTRAP                5
 +#define SIGABRT                6
 +#define SIGEMT                 7
 +#define SIGFPE                 8
 +#define SIGKILL                9
 +#define SIGBUS                10
 +#define SIGSEGV               11
 +#define SIGSYS                12
 +#define SIGPIPE               13
 +#define SIGALRM               14
 +#define SIGTERM               15
 +#define SIGURG                16
 +#define SIGSTOP               17
 +#define SIGTSTP               18
 +#define SIGCONT               19
 +#define SIGCHLD               20
 +#define SIGTTIN               21
 +#define SIGTTOU               22
 +#define SIGIO         23
 +#define SIGXCPU               24
 +#define SIGXFSZ               25
 +#define SIGVTALRM     26
 +#define SIGPROF               27
 +#define SIGWINCH      28
 +#define SIGINFO               29
 +#define SIGUSR1               30
 +#define SIGUSR2               31
 +
 +#define SIGPOLL       SIGIO
 +#define SIGPWR        SIGINFO
 +#define SIGIOT        SIGABRT
 +
 +/* These should not be considered constants from userland.  */
 +#define SIGRTMIN      32
 +#define SIGRTMAX      _NSIG
 +
 +/*
 + * SA_FLAGS values:
 + *
 + * SA_ONSTACK indicates that a registered stack_t will be used.
 + * SA_RESTART flag to get restarting signals (which were the default long ago)
 + * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
 + * SA_RESETHAND clears the handler when the signal is delivered.
 + * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
 + * SA_NODEFER prevents the current signal from being masked in the handler.
 + *
 + * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
 + * Unix names RESETHAND and NODEFER respectively.
 + */
 +
 +#define SA_ONSTACK    0x00000001
 +#define SA_RESTART    0x00000002
 +#define SA_NOCLDSTOP  0x00000004
 +#define SA_NODEFER    0x00000008
 +#define SA_RESETHAND  0x00000010
 +#define SA_NOCLDWAIT  0x00000020
 +#define SA_SIGINFO    0x00000040
 +
 +#define SA_ONESHOT    SA_RESETHAND
 +#define SA_NOMASK     SA_NODEFER
 +
 +#define MINSIGSTKSZ   4096
 +#define SIGSTKSZ      16384
 +
 +#define SIG_BLOCK          1  /* for blocking signals */
 +#define SIG_UNBLOCK        2  /* for unblocking signals */
 +#define SIG_SETMASK        3  /* for setting the signal mask */
 +
 +#include <asm-generic/signal-defs.h>
 +
 +#ifndef __KERNEL__
 +/* Here we must cater to libcs that poke about in kernel headers.  */
 +
 +struct sigaction {
 +      union {
 +        __sighandler_t        _sa_handler;
 +        void (*_sa_sigaction)(int, struct siginfo *, void *);
 +      } _u;
 +      sigset_t        sa_mask;
 +      int             sa_flags;
 +};
 +
 +#define sa_handler    _u._sa_handler
 +#define sa_sigaction  _u._sa_sigaction
 +
 +#endif /* __KERNEL__ */
 +
 +typedef struct sigaltstack {
 +      void __user *ss_sp;
 +      int ss_flags;
 +      size_t ss_size;
 +} stack_t;
 +
 +/* sigstack(2) is deprecated, and will be withdrawn in a future version
 +   of the X/Open CAE Specification.  Use sigaltstack instead.  It is only
 +   implemented here for OSF/1 compatibility.  */
 +
 +struct sigstack {
 +      void __user *ss_sp;
 +      int ss_onstack;
 +};
 +
 +
 +#endif /* _UAPI_ASMAXP_SIGNAL_H */
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 2de84d7061c7015aa8adea1374671e5dcae54c33,551c081ab62b07dbf015bd18644ac55c60ab2eeb..9e788d04a4ef1b9c5d956f578fe4ee53b3bb9c2a
@@@ -9,5 -10,8 +9,6 @@@
  #define PTRACE_SETREGS            13
  
  #define profile_pc(regs) instruction_pointer(regs)
+ #define current_user_stack_pointer() rdusp()
  
 -#endif /* __KERNEL__ */
 -
  #endif /* _CRIS_PTRACE_H */
Simple merge
index 21624948a96d72d16502408cabc3b64241eb18c1,0000000000000000000000000000000000000000..ce42fa7c32ad614ba6671a81dd1d2882588509d1
mode 100644,000000..100644
--- /dev/null
@@@ -1,122 -1,0 +1,116 @@@
- /* 
-  * sigaltstack controls
-  */
- #define SS_ONSTACK    1
- #define SS_DISABLE    2
 +#ifndef _UAPI_ASM_CRIS_SIGNAL_H
 +#define _UAPI_ASM_CRIS_SIGNAL_H
 +
 +#include <linux/types.h>
 +
 +/* Avoid too many header ordering problems.  */
 +struct siginfo;
 +
 +#ifndef __KERNEL__
 +/* Here we must cater to libcs that poke about in kernel headers.  */
 +
 +#define NSIG          32
 +typedef unsigned long sigset_t;
 +
 +#endif /* __KERNEL__ */
 +
 +#define SIGHUP                 1
 +#define SIGINT                 2
 +#define SIGQUIT                3
 +#define SIGILL                 4
 +#define SIGTRAP                5
 +#define SIGABRT                6
 +#define SIGIOT                 6
 +#define SIGBUS                 7
 +#define SIGFPE                 8
 +#define SIGKILL                9
 +#define SIGUSR1               10
 +#define SIGSEGV               11
 +#define SIGUSR2               12
 +#define SIGPIPE               13
 +#define SIGALRM               14
 +#define SIGTERM               15
 +#define SIGSTKFLT     16
 +#define SIGCHLD               17
 +#define SIGCONT               18
 +#define SIGSTOP               19
 +#define SIGTSTP               20
 +#define SIGTTIN               21
 +#define SIGTTOU               22
 +#define SIGURG                23
 +#define SIGXCPU               24
 +#define SIGXFSZ               25
 +#define SIGVTALRM     26
 +#define SIGPROF               27
 +#define SIGWINCH      28
 +#define SIGIO         29
 +#define SIGPOLL               SIGIO
 +/*
 +#define SIGLOST               29
 +*/
 +#define SIGPWR                30
 +#define SIGSYS          31
 +#define       SIGUNUSED       31
 +
 +/* These should not be considered constants from userland.  */
 +#define SIGRTMIN        32
 +#define SIGRTMAX        _NSIG
 +
 +/*
 + * SA_FLAGS values:
 + *
 + * SA_ONSTACK indicates that a registered stack_t will be used.
 + * SA_RESTART flag to get restarting signals (which were the default long ago)
 + * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
 + * SA_RESETHAND clears the handler when the signal is delivered.
 + * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
 + * SA_NODEFER prevents the current signal from being masked in the handler.
 + *
 + * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
 + * Unix names RESETHAND and NODEFER respectively.
 + */
 +
 +#define SA_NOCLDSTOP  0x00000001u
 +#define SA_NOCLDWAIT  0x00000002u
 +#define SA_SIGINFO    0x00000004u
 +#define SA_ONSTACK    0x08000000u
 +#define SA_RESTART    0x10000000u
 +#define SA_NODEFER    0x40000000u
 +#define SA_RESETHAND  0x80000000u
 +
 +#define SA_NOMASK     SA_NODEFER
 +#define SA_ONESHOT    SA_RESETHAND
 +
 +#define SA_RESTORER   0x04000000
 +
 +#define MINSIGSTKSZ   2048
 +#define SIGSTKSZ      8192
 +
 +#include <asm-generic/signal-defs.h>
 +
 +#ifndef __KERNEL__
 +/* Here we must cater to libcs that poke about in kernel headers.  */
 +
 +struct sigaction {
 +      union {
 +        __sighandler_t _sa_handler;
 +        void (*_sa_sigaction)(int, struct siginfo *, void *);
 +      } _u;
 +      sigset_t sa_mask;
 +      unsigned long sa_flags;
 +      void (*sa_restorer)(void);
 +};
 +
 +#define sa_handler    _u._sa_handler
 +#define sa_sigaction  _u._sa_sigaction
 +
 +#endif /* __KERNEL__ */
 +
 +typedef struct sigaltstack {
 +      void *ss_sp;
 +      int ss_flags;
 +      size_t ss_size;
 +} stack_t;
 +
 +
 +#endif /* _UAPI_ASM_CRIS_SIGNAL_H */
Simple merge
index 79c9a91e75ef6d213338ebc8a4efb2569eda3682,6183371d0c9346d7b6c2c41d966a4f3919d63381..c1826b95c5ca1cb1d810216a4b4a12c9a869811f
@@@ -28,5 -63,7 +28,6 @@@
  #define current_pt_regs() ((struct pt_regs *) \
        (THREAD_SIZE + (unsigned long)current_thread_info()) - 1)
  #define signal_pt_regs() ((struct pt_regs *)current->thread.esp0)
 -#endif /* __KERNEL__ */
+ #define current_user_stack_pointer() rdusp()
  #endif /* __ASSEMBLY__ */
  #endif /* _H8300_PTRACE_H */
Simple merge
index 913729e581e8341e0d3ae8fd48c7a6119a0c523d,0000000000000000000000000000000000000000..af3a6c37fee68f7ce22e43ba076d75ce46ffd2f7
mode 100644,000000..100644
--- /dev/null
@@@ -1,121 -1,0 +1,115 @@@
- /* 
-  * sigaltstack controls
-  */
- #define SS_ONSTACK    1
- #define SS_DISABLE    2
 +#ifndef _UAPI_H8300_SIGNAL_H
 +#define _UAPI_H8300_SIGNAL_H
 +
 +#include <linux/types.h>
 +
 +/* Avoid too many header ordering problems.  */
 +struct siginfo;
 +
 +#ifndef __KERNEL__
 +/* Here we must cater to libcs that poke about in kernel headers.  */
 +
 +#define NSIG          32
 +typedef unsigned long sigset_t;
 +
 +#endif /* __KERNEL__ */
 +
 +#define SIGHUP                 1
 +#define SIGINT                 2
 +#define SIGQUIT                3
 +#define SIGILL                 4
 +#define SIGTRAP                5
 +#define SIGABRT                6
 +#define SIGIOT                 6
 +#define SIGBUS                 7
 +#define SIGFPE                 8
 +#define SIGKILL                9
 +#define SIGUSR1               10
 +#define SIGSEGV               11
 +#define SIGUSR2               12
 +#define SIGPIPE               13
 +#define SIGALRM               14
 +#define SIGTERM               15
 +#define SIGSTKFLT     16
 +#define SIGCHLD               17
 +#define SIGCONT               18
 +#define SIGSTOP               19
 +#define SIGTSTP               20
 +#define SIGTTIN               21
 +#define SIGTTOU               22
 +#define SIGURG                23
 +#define SIGXCPU               24
 +#define SIGXFSZ               25
 +#define SIGVTALRM     26
 +#define SIGPROF               27
 +#define SIGWINCH      28
 +#define SIGIO         29
 +#define SIGPOLL               SIGIO
 +/*
 +#define SIGLOST               29
 +*/
 +#define SIGPWR                30
 +#define SIGSYS                31
 +#define       SIGUNUSED       31
 +
 +/* These should not be considered constants from userland.  */
 +#define SIGRTMIN      32
 +#define SIGRTMAX      _NSIG
 +
 +/*
 + * SA_FLAGS values:
 + *
 + * SA_ONSTACK indicates that a registered stack_t will be used.
 + * SA_RESTART flag to get restarting signals (which were the default long ago)
 + * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
 + * SA_RESETHAND clears the handler when the signal is delivered.
 + * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
 + * SA_NODEFER prevents the current signal from being masked in the handler.
 + *
 + * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
 + * Unix names RESETHAND and NODEFER respectively.
 + */
 +#define SA_NOCLDSTOP  0x00000001
 +#define SA_NOCLDWAIT  0x00000002 /* not supported yet */
 +#define SA_SIGINFO    0x00000004
 +#define SA_ONSTACK    0x08000000
 +#define SA_RESTART    0x10000000
 +#define SA_NODEFER    0x40000000
 +#define SA_RESETHAND  0x80000000
 +
 +#define SA_NOMASK     SA_NODEFER
 +#define SA_ONESHOT    SA_RESETHAND
 +
 +#define SA_RESTORER   0x04000000
 +
 +#define MINSIGSTKSZ   2048
 +#define SIGSTKSZ      8192
 +
 +#include <asm-generic/signal-defs.h>
 +
 +#ifndef __KERNEL__
 +/* Here we must cater to libcs that poke about in kernel headers.  */
 +
 +struct sigaction {
 +      union {
 +        __sighandler_t _sa_handler;
 +        void (*_sa_sigaction)(int, struct siginfo *, void *);
 +      } _u;
 +      sigset_t sa_mask;
 +      unsigned long sa_flags;
 +      void (*sa_restorer)(void);
 +};
 +
 +#define sa_handler    _u._sa_handler
 +#define sa_sigaction  _u._sa_sigaction
 +
 +#endif /* __KERNEL__ */
 +
 +typedef struct sigaltstack {
 +      void *ss_sp;
 +      int ss_flags;
 +      size_t ss_size;
 +} stack_t;
 +
 +
 +#endif /* _UAPI_H8300_SIGNAL_H */
Simple merge
Simple merge
index ef9788fda2ef4723adda64e28a159ee83c16d324,0000000000000000000000000000000000000000..54acacb1f1f7f69df43bf17006c251f09a6c1abd
mode 100644,000000..100644
--- /dev/null
@@@ -1,123 -1,0 +1,117 @@@
- /*
-  * sigaltstack controls
-  */
- #define SS_ONSTACK    1
- #define SS_DISABLE    2
 +#ifndef _UAPI_ASM_M32R_SIGNAL_H
 +#define _UAPI_ASM_M32R_SIGNAL_H
 +
 +#include <linux/types.h>
 +#include <linux/time.h>
 +#include <linux/compiler.h>
 +
 +/* Avoid too many header ordering problems.  */
 +struct siginfo;
 +
 +#ifndef __KERNEL__
 +/* Here we must cater to libcs that poke about in kernel headers.  */
 +
 +#define NSIG          32
 +typedef unsigned long sigset_t;
 +
 +#endif /* __KERNEL__ */
 +
 +#define SIGHUP                 1
 +#define SIGINT                 2
 +#define SIGQUIT                3
 +#define SIGILL                 4
 +#define SIGTRAP                5
 +#define SIGABRT                6
 +#define SIGIOT                 6
 +#define SIGBUS                 7
 +#define SIGFPE                 8
 +#define SIGKILL                9
 +#define SIGUSR1               10
 +#define SIGSEGV               11
 +#define SIGUSR2               12
 +#define SIGPIPE               13
 +#define SIGALRM               14
 +#define SIGTERM               15
 +#define SIGSTKFLT     16
 +#define SIGCHLD               17
 +#define SIGCONT               18
 +#define SIGSTOP               19
 +#define SIGTSTP               20
 +#define SIGTTIN               21
 +#define SIGTTOU               22
 +#define SIGURG                23
 +#define SIGXCPU               24
 +#define SIGXFSZ               25
 +#define SIGVTALRM     26
 +#define SIGPROF               27
 +#define SIGWINCH      28
 +#define SIGIO         29
 +#define SIGPOLL               SIGIO
 +/*
 +#define SIGLOST               29
 +*/
 +#define SIGPWR                30
 +#define SIGSYS                31
 +#define       SIGUNUSED       31
 +
 +/* These should not be considered constants from userland.  */
 +#define SIGRTMIN      32
 +#define SIGRTMAX      _NSIG
 +
 +/*
 + * SA_FLAGS values:
 + *
 + * SA_ONSTACK indicates that a registered stack_t will be used.
 + * SA_RESTART flag to get restarting signals (which were the default long ago)
 + * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
 + * SA_RESETHAND clears the handler when the signal is delivered.
 + * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
 + * SA_NODEFER prevents the current signal from being masked in the handler.
 + *
 + * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
 + * Unix names RESETHAND and NODEFER respectively.
 + */
 +#define SA_NOCLDSTOP  0x00000001u
 +#define SA_NOCLDWAIT  0x00000002u
 +#define SA_SIGINFO    0x00000004u
 +#define SA_ONSTACK    0x08000000u
 +#define SA_RESTART    0x10000000u
 +#define SA_NODEFER    0x40000000u
 +#define SA_RESETHAND  0x80000000u
 +
 +#define SA_NOMASK     SA_NODEFER
 +#define SA_ONESHOT    SA_RESETHAND
 +
 +#define SA_RESTORER   0x04000000
 +
 +#define MINSIGSTKSZ   2048
 +#define SIGSTKSZ      8192
 +
 +#include <asm-generic/signal-defs.h>
 +
 +#ifndef __KERNEL__
 +/* Here we must cater to libcs that poke about in kernel headers.  */
 +
 +struct sigaction {
 +      union {
 +        __sighandler_t _sa_handler;
 +        void (*_sa_sigaction)(int, struct siginfo *, void *);
 +      } _u;
 +      sigset_t sa_mask;
 +      unsigned long sa_flags;
 +      void (*sa_restorer)(void);
 +};
 +
 +#define sa_handler    _u._sa_handler
 +#define sa_sigaction  _u._sa_sigaction
 +
 +#endif /* __KERNEL__ */
 +
 +typedef struct sigaltstack {
 +      void __user *ss_sp;
 +      int ss_flags;
 +      size_t ss_size;
 +} stack_t;
 +
 +
 +#endif /* _UAPI_ASM_M32R_SIGNAL_H */
Simple merge
Simple merge
Simple merge
Simple merge
index 29365e15ed7c1d3425a906459344fedd06ddb766,784872f937110e78a018c1abe20804881aa96e51..1d4864a40e3560fa4a61f2b7f5d22eb5607dcdc1
@@@ -54,9 -54,7 +54,8 @@@
  #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
  #define __ARCH_WANT_SYS_NEWFSTATAT
  #define __ARCH_WANT_COMPAT_SYS_SENDFILE
 +#define __ARCH_WANT_COMPAT_SYS_SCHED_RR_GET_INTERVAL
  #endif
- #define __ARCH_WANT_SYS_EXECVE
  #define __ARCH_WANT_SYS_FORK
  #define __ARCH_WANT_SYS_VFORK
  #define __ARCH_WANT_SYS_CLONE
Simple merge
Simple merge
index 56001c93095aaa7977d869e41f7866a5b0598f2c,0000000000000000000000000000000000000000..9cb4260a5f3e3ea232fd1a328bac9f7e5ed854b3
mode 100644,000000..100644
--- /dev/null
@@@ -1,12 -1,0 +1,11 @@@
- #define __ARCH_WANT_SYS_EXECVE
 +#define __ARCH_HAVE_MMU
 +
 +#define __ARCH_WANT_SYSCALL_NO_AT
 +#define __ARCH_WANT_SYSCALL_NO_FLAGS
 +#define __ARCH_WANT_SYSCALL_OFF_T
 +#define __ARCH_WANT_SYSCALL_DEPRECATED
 +#define __ARCH_WANT_SYS_CLONE
 +#define __ARCH_WANT_SYS_FORK
 +#define __ARCH_WANT_SYS_VFORK
 +
 +#include <asm-generic/unistd.h>
index 497386a7ed28d754e5efcc2a5c9d530e8cb56142,0ecea6ed943e3a5b525e90711ef80a5cdbc16f57..87ce24c5eb95a479d35f5709b3d85f1bbf4c3076
@@@ -45,9 -45,7 +45,8 @@@
  #define __ARCH_WANT_COMPAT_SYS_TIME
  #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
  #define __ARCH_WANT_COMPAT_SYS_SENDFILE
 +#define __ARCH_WANT_COMPAT_SYS_SCHED_RR_GET_INTERVAL
  #endif
- #define __ARCH_WANT_SYS_EXECVE
  
  /*
   * "Conditional" syscalls
Simple merge
index fe841e7d4963e5e88ccdf08193788d535be4da9e,940831fe9e94906a04ec5bd1040f80720f6c1cf7..6ac21034f69a695e7d38a5656c80e1bdde0bdfb6
@@@ -14,9 -14,7 +14,8 @@@
  /* In compat mode, we use sys_llseek() for compat_sys_llseek(). */
  #ifdef CONFIG_COMPAT
  #define __ARCH_WANT_SYS_LLSEEK
 +#define __ARCH_WANT_COMPAT_SYS_SCHED_RR_GET_INTERVAL
  #endif
  #define __ARCH_WANT_SYS_NEWFSTATAT
- #define __ARCH_WANT_SYS_EXECVE
  #define __ARCH_WANT_SYS_CLONE
  #include <uapi/asm/unistd.h>
index 97f8c5ad8c2ddff2449da615e46c2faab3b9d067,f380614d7d896442e8708131333c13d014bbfcb6..79795af598105e9998f0de234b279fb6c61ca42f
@@@ -108,10 -106,8 +108,8 @@@ config X8
        select KTIME_SCALAR if X86_32
        select GENERIC_STRNCPY_FROM_USER
        select GENERIC_STRNLEN_USER
 -      select HAVE_RCU_USER_QS if X86_64
 +      select HAVE_CONTEXT_TRACKING if X86_64
        select HAVE_IRQ_TIME_ACCOUNTING
-       select GENERIC_KERNEL_THREAD
-       select GENERIC_KERNEL_EXECVE
        select MODULES_USE_ELF_REL if X86_32
        select MODULES_USE_ELF_RELA if X86_64
        select CLONE_BACKWARDS if X86_32
Simple merge
Simple merge
index 0818f9a8e889f047932ba9f78aca5a95c6c3ed39,0000000000000000000000000000000000000000..aa7d6ae39e0e9b8629938a408ba3e7f18a5a0fca
mode 100644,000000..100644
--- /dev/null
@@@ -1,145 -1,0 +1,139 @@@
- /*
-  * sigaltstack controls
-  */
- #define SS_ONSTACK    1
- #define SS_DISABLE    2
 +#ifndef _UAPI_ASM_X86_SIGNAL_H
 +#define _UAPI_ASM_X86_SIGNAL_H
 +
 +#ifndef __ASSEMBLY__
 +#include <linux/types.h>
 +#include <linux/time.h>
 +#include <linux/compiler.h>
 +
 +/* Avoid too many header ordering problems.  */
 +struct siginfo;
 +
 +#ifndef __KERNEL__
 +/* Here we must cater to libcs that poke about in kernel headers.  */
 +
 +#define NSIG          32
 +typedef unsigned long sigset_t;
 +
 +#endif /* __KERNEL__ */
 +#endif /* __ASSEMBLY__ */
 +
 +
 +#define SIGHUP                 1
 +#define SIGINT                 2
 +#define SIGQUIT                3
 +#define SIGILL                 4
 +#define SIGTRAP                5
 +#define SIGABRT                6
 +#define SIGIOT                 6
 +#define SIGBUS                 7
 +#define SIGFPE                 8
 +#define SIGKILL                9
 +#define SIGUSR1               10
 +#define SIGSEGV               11
 +#define SIGUSR2               12
 +#define SIGPIPE               13
 +#define SIGALRM               14
 +#define SIGTERM               15
 +#define SIGSTKFLT     16
 +#define SIGCHLD               17
 +#define SIGCONT               18
 +#define SIGSTOP               19
 +#define SIGTSTP               20
 +#define SIGTTIN               21
 +#define SIGTTOU               22
 +#define SIGURG                23
 +#define SIGXCPU               24
 +#define SIGXFSZ               25
 +#define SIGVTALRM     26
 +#define SIGPROF               27
 +#define SIGWINCH      28
 +#define SIGIO         29
 +#define SIGPOLL               SIGIO
 +/*
 +#define SIGLOST               29
 +*/
 +#define SIGPWR                30
 +#define SIGSYS                31
 +#define       SIGUNUSED       31
 +
 +/* These should not be considered constants from userland.  */
 +#define SIGRTMIN      32
 +#define SIGRTMAX      _NSIG
 +
 +/*
 + * SA_FLAGS values:
 + *
 + * SA_ONSTACK indicates that a registered stack_t will be used.
 + * SA_RESTART flag to get restarting signals (which were the default long ago)
 + * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
 + * SA_RESETHAND clears the handler when the signal is delivered.
 + * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
 + * SA_NODEFER prevents the current signal from being masked in the handler.
 + *
 + * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
 + * Unix names RESETHAND and NODEFER respectively.
 + */
 +#define SA_NOCLDSTOP  0x00000001u
 +#define SA_NOCLDWAIT  0x00000002u
 +#define SA_SIGINFO    0x00000004u
 +#define SA_ONSTACK    0x08000000u
 +#define SA_RESTART    0x10000000u
 +#define SA_NODEFER    0x40000000u
 +#define SA_RESETHAND  0x80000000u
 +
 +#define SA_NOMASK     SA_NODEFER
 +#define SA_ONESHOT    SA_RESETHAND
 +
 +#define SA_RESTORER   0x04000000
 +
 +#define MINSIGSTKSZ   2048
 +#define SIGSTKSZ      8192
 +
 +#include <asm-generic/signal-defs.h>
 +
 +#ifndef __ASSEMBLY__
 +
 +
 +#ifdef __i386__
 +# ifndef __KERNEL__
 +/* Here we must cater to libcs that poke about in kernel headers.  */
 +
 +struct sigaction {
 +      union {
 +        __sighandler_t _sa_handler;
 +        void (*_sa_sigaction)(int, struct siginfo *, void *);
 +      } _u;
 +      sigset_t sa_mask;
 +      unsigned long sa_flags;
 +      void (*sa_restorer)(void);
 +};
 +
 +#define sa_handler    _u._sa_handler
 +#define sa_sigaction  _u._sa_sigaction
 +
 +# endif /* ! __KERNEL__ */
 +#else /* __i386__ */
 +
 +struct sigaction {
 +      __sighandler_t sa_handler;
 +      unsigned long sa_flags;
 +      __sigrestore_t sa_restorer;
 +      sigset_t sa_mask;               /* mask last for extensibility */
 +};
 +
 +struct k_sigaction {
 +      struct sigaction sa;
 +};
 +
 +#endif /* !__i386__ */
 +
 +typedef struct sigaltstack {
 +      void __user *ss_sp;
 +      int ss_flags;
 +      size_t ss_size;
 +} stack_t;
 +
 +#endif /* __ASSEMBLY__ */
 +
 +#endif /* _UAPI_ASM_X86_SIGNAL_H */
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 73d34e77c39c136b0066236b7b8a2f43d8b9aa0c,03a8c107e07eefb32bbe5a420b4d45018dfbe8ef..5aab1acabf1cb4440c0b5656ecff733bc1df7b07
@@@ -13,11 -13,8 +13,9 @@@ config XTENS
        select GENERIC_CPU_DEVICES
        select MODULES_USE_ELF_RELA
        select GENERIC_PCI_IOMAP
-       select GENERIC_KERNEL_THREAD
-       select GENERIC_KERNEL_EXECVE
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select CLONE_BACKWARDS
 +      select IRQ_DOMAIN
        help
          Xtensa processors are 32-bit RISC machines designed by Tensilica
          primarily for embedded systems.  These processors are both
Simple merge
diff --cc fs/exec.c
Simple merge
Simple merge
index e4920bd58a4792c040d3901d702388c50d6c3c26,334813307ec10fc5c87607870243d5685689011e..dec7e2d188758369d1c5d10cc7a978eb3b9ce423
@@@ -587,10 -642,14 +642,17 @@@ asmlinkage ssize_t compat_sys_process_v
  
  asmlinkage long compat_sys_sendfile(int out_fd, int in_fd,
                                    compat_off_t __user *offset, compat_size_t count);
+ #ifdef CONFIG_GENERIC_SIGALTSTACK
+ asmlinkage long compat_sys_sigaltstack(const compat_stack_t __user *uss_ptr,
+                                      compat_stack_t __user *uoss_ptr);
+ int compat_restore_altstack(const compat_stack_t __user *uss);
+ int __compat_save_altstack(compat_stack_t __user *, unsigned long);
+ #endif
  
 +asmlinkage long compat_sys_sched_rr_get_interval(compat_pid_t pid,
 +                                               struct compat_timespec __user *interval);
 +
  #else
  
  #define is_compat_task() (0)
Simple merge
Simple merge
Simple merge
diff --cc init/main.c
Simple merge
diff --cc kernel/fork.c
Simple merge
diff --cc kernel/signal.c
Simple merge