aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-20 21:05:28 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-20 21:05:28 -0500
commit54d46ea993744c5408e39ce0cb4851e13cbea716 (patch)
tree8e38fa92cc2ae72e0353c44e1e68be9bf5a7a058 /arch/x86/include/asm
parentf59dc2bb5a50b26ea751f9eac1c81e4cc7de5257 (diff)
parent50ececcfa7d1acee085b2c518cad495062db6379 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
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
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r--arch/x86/include/asm/ia32.h10
-rw-r--r--arch/x86/include/asm/ptrace.h7
-rw-r--r--arch/x86/include/asm/sys_ia32.h2
-rw-r--r--arch/x86/include/asm/syscalls.h3
-rw-r--r--arch/x86/include/asm/unistd.h1
5 files changed, 9 insertions, 14 deletions
diff --git a/arch/x86/include/asm/ia32.h b/arch/x86/include/asm/ia32.h
index e6232773ce4..4c6da2e4bb1 100644
--- a/arch/x86/include/asm/ia32.h
+++ b/arch/x86/include/asm/ia32.h
@@ -29,16 +29,10 @@ struct old_sigaction32 {
29 unsigned int sa_restorer; /* Another 32 bit pointer */ 29 unsigned int sa_restorer; /* Another 32 bit pointer */
30}; 30};
31 31
32typedef struct sigaltstack_ia32 {
33 unsigned int ss_sp;
34 int ss_flags;
35 unsigned int ss_size;
36} stack_ia32_t;
37
38struct ucontext_ia32 { 32struct ucontext_ia32 {
39 unsigned int uc_flags; 33 unsigned int uc_flags;
40 unsigned int uc_link; 34 unsigned int uc_link;
41 stack_ia32_t uc_stack; 35 compat_stack_t uc_stack;
42 struct sigcontext_ia32 uc_mcontext; 36 struct sigcontext_ia32 uc_mcontext;
43 compat_sigset_t uc_sigmask; /* mask last for extensibility */ 37 compat_sigset_t uc_sigmask; /* mask last for extensibility */
44}; 38};
@@ -46,7 +40,7 @@ struct ucontext_ia32 {
46struct ucontext_x32 { 40struct ucontext_x32 {
47 unsigned int uc_flags; 41 unsigned int uc_flags;
48 unsigned int uc_link; 42 unsigned int uc_link;
49 stack_ia32_t uc_stack; 43 compat_stack_t uc_stack;
50 unsigned int uc__pad0; /* needed for alignment */ 44 unsigned int uc__pad0; /* needed for alignment */
51 struct sigcontext uc_mcontext; /* the 64-bit sigcontext type */ 45 struct sigcontext uc_mcontext; /* the 64-bit sigcontext type */
52 compat_sigset_t uc_sigmask; /* mask last for extensibility */ 46 compat_sigset_t uc_sigmask; /* mask last for extensibility */
diff --git a/arch/x86/include/asm/ptrace.h b/arch/x86/include/asm/ptrace.h
index 03ca442d8f0..942a08623a1 100644
--- a/arch/x86/include/asm/ptrace.h
+++ b/arch/x86/include/asm/ptrace.h
@@ -133,6 +133,13 @@ static inline bool user_64bit_mode(struct pt_regs *regs)
133 return regs->cs == __USER_CS || regs->cs == pv_info.extra_user_64bit_cs; 133 return regs->cs == __USER_CS || regs->cs == pv_info.extra_user_64bit_cs;
134#endif 134#endif
135} 135}
136
137#define current_user_stack_pointer() this_cpu_read(old_rsp)
138/* ia32 vs. x32 difference */
139#define compat_user_stack_pointer() \
140 (test_thread_flag(TIF_IA32) \
141 ? current_pt_regs()->sp \
142 : this_cpu_read(old_rsp))
136#endif 143#endif
137 144
138#ifdef CONFIG_X86_32 145#ifdef CONFIG_X86_32
diff --git a/arch/x86/include/asm/sys_ia32.h b/arch/x86/include/asm/sys_ia32.h
index c76fae4d90b..31f61f96e0f 100644
--- a/arch/x86/include/asm/sys_ia32.h
+++ b/arch/x86/include/asm/sys_ia32.h
@@ -69,8 +69,6 @@ asmlinkage long sys32_fallocate(int, int, unsigned,
69 69
70/* ia32/ia32_signal.c */ 70/* ia32/ia32_signal.c */
71asmlinkage long sys32_sigsuspend(int, int, old_sigset_t); 71asmlinkage long sys32_sigsuspend(int, int, old_sigset_t);
72asmlinkage long sys32_sigaltstack(const stack_ia32_t __user *,
73 stack_ia32_t __user *, struct pt_regs *);
74asmlinkage long sys32_sigreturn(struct pt_regs *); 72asmlinkage long sys32_sigreturn(struct pt_regs *);
75asmlinkage long sys32_rt_sigreturn(struct pt_regs *); 73asmlinkage long sys32_rt_sigreturn(struct pt_regs *);
76 74
diff --git a/arch/x86/include/asm/syscalls.h b/arch/x86/include/asm/syscalls.h
index 2f8374718aa..58b7e3eac0a 100644
--- a/arch/x86/include/asm/syscalls.h
+++ b/arch/x86/include/asm/syscalls.h
@@ -25,9 +25,6 @@ asmlinkage int sys_modify_ldt(int, void __user *, unsigned long);
25 25
26/* kernel/signal.c */ 26/* kernel/signal.c */
27long sys_rt_sigreturn(struct pt_regs *); 27long sys_rt_sigreturn(struct pt_regs *);
28long sys_sigaltstack(const stack_t __user *, stack_t __user *,
29 struct pt_regs *);
30
31 28
32/* kernel/tls.c */ 29/* kernel/tls.c */
33asmlinkage int sys_set_thread_area(struct user_desc __user *); 30asmlinkage int sys_set_thread_area(struct user_desc __user *);
diff --git a/arch/x86/include/asm/unistd.h b/arch/x86/include/asm/unistd.h
index 1003e69a40d..a0790e07ba6 100644
--- a/arch/x86/include/asm/unistd.h
+++ b/arch/x86/include/asm/unistd.h
@@ -48,7 +48,6 @@
48# define __ARCH_WANT_SYS_TIME 48# define __ARCH_WANT_SYS_TIME
49# define __ARCH_WANT_SYS_UTIME 49# define __ARCH_WANT_SYS_UTIME
50# define __ARCH_WANT_SYS_WAITPID 50# define __ARCH_WANT_SYS_WAITPID
51# define __ARCH_WANT_SYS_EXECVE
52# define __ARCH_WANT_SYS_FORK 51# define __ARCH_WANT_SYS_FORK
53# define __ARCH_WANT_SYS_VFORK 52# define __ARCH_WANT_SYS_VFORK
54# define __ARCH_WANT_SYS_CLONE 53# define __ARCH_WANT_SYS_CLONE