From: Stephen Rothwell Date: Wed, 20 Feb 2013 05:30:49 +0000 (+1100) Subject: Merge remote-tracking branch 'signal/for-next' X-Git-Tag: next-20130220~6 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a0b2dea1fdcf896822842a21ef638cc0560f6783;p=karo-tx-linux.git Merge remote-tracking branch 'signal/for-next' Conflicts: arch/mips/kernel/linux32.c arch/mips/kernel/process.c arch/mips/kernel/scall64-o32.S arch/mips/kernel/signal.c arch/mips/kernel/signal32.c arch/mips/kernel/signal_n32.c arch/mips/kernel/syscall.c arch/powerpc/Kconfig arch/s390/Kconfig arch/x86/Kconfig --- a0b2dea1fdcf896822842a21ef638cc0560f6783 diff --cc arch/arm64/kernel/signal32.c index 41db148a7eb9,92ada01f4cd8..7f4f3673f2bc --- a/arch/arm64/kernel/signal32.c +++ b/arch/arm64/kernel/signal32.c @@@ -703,13 -560,9 +560,9 @@@ int compat_setup_rt_frame(int usig, str err |= copy_siginfo_to_user32(&frame->info, info); __put_user_error(0, &frame->sig.uc.uc_flags, err); - __put_user_error(NULL, &frame->sig.uc.uc_link, err); + __put_user_error(0, &frame->sig.uc.uc_link, err); - memset(&stack, 0, sizeof(stack)); - stack.ss_sp = (compat_uptr_t)current->sas_ss_sp; - stack.ss_flags = sas_ss_flags(regs->compat_sp); - stack.ss_size = current->sas_ss_size; - err |= __copy_to_user(&frame->sig.uc.uc_stack, &stack, sizeof(stack)); + err |= __compat_save_altstack(&frame->sig.uc.uc_stack, regs->compat_sp); err |= compat_setup_sigframe(&frame->sig, regs, set); diff --cc arch/mips/kernel/linux32.c index 16bf4a5d3d1a,253bd8ad7446..8eeee1c860c0 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c @@@ -292,30 -276,9 +276,9 @@@ asmlinkage long sys32_fallocate(int fd unsigned offset_a3, unsigned len_a4, unsigned len_a5) { return sys_fallocate(fd, mode, merge_64(offset_a2, offset_a3), - merge_64(len_a4, len_a5)); + merge_64(len_a4, len_a5)); } - save_static_function(sys32_clone); - static int noinline __used - _sys32_clone(nabi_no_regargs struct pt_regs regs) - { - unsigned long clone_flags; - unsigned long newsp; - int __user *parent_tidptr, *child_tidptr; - - clone_flags = regs.regs[4]; - newsp = regs.regs[5]; - if (!newsp) - newsp = regs.regs[29]; - parent_tidptr = (int __user *) regs.regs[6]; - - /* Use __dummy4 instead of getting it off the stack, so that - syscall() works. */ - child_tidptr = (int __user *) __dummy4; - return do_fork(clone_flags, newsp, 0, - parent_tidptr, child_tidptr); - } - asmlinkage long sys32_lookup_dcookie(u32 a0, u32 a1, char __user *buf, size_t len) { diff --cc arch/mips/kernel/scall64-o32.S index 42e789562db4,063cd0d6ddd2..402d7469e1a0 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S @@@ -357,7 -357,7 +357,7 @@@ sys_call_table PTR sys_sched_yield PTR sys_sched_get_priority_max PTR sys_sched_get_priority_min - PTR sys_32_sched_rr_get_interval /* 4165 */ - PTR compat_sys_sched_rr_get_interval /* 4165 */ ++ PTR compat_sys_sched_rr_get_interval /* 4165 */ PTR compat_sys_nanosleep PTR sys_mremap PTR sys_accept @@@ -386,12 -386,12 +386,12 @@@ PTR sys_getresgid PTR sys_prctl PTR sys32_rt_sigreturn - PTR sys_32_rt_sigaction - PTR sys_32_rt_sigprocmask /* 4195 */ - PTR sys_32_rt_sigpending + PTR compat_sys_rt_sigaction - PTR compat_sys_rt_sigprocmask /* 4195 */ ++ PTR compat_sys_rt_sigprocmask /* 4195 */ + PTR compat_sys_rt_sigpending PTR compat_sys_rt_sigtimedwait - PTR sys_32_rt_sigqueueinfo - PTR sys32_rt_sigsuspend + PTR compat_sys_rt_sigqueueinfo + PTR compat_sys_rt_sigsuspend PTR sys_32_pread /* 4200 */ PTR sys_32_pwrite PTR sys_chown diff --cc arch/mips/kernel/signal.c index 0f57e06b7fdd,95b019d92f50..b5e88fd83277 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c @@@ -458,15 -425,10 +425,10 @@@ static int setup_rt_frame(void *sig_ret /* Create siginfo. */ err |= copy_siginfo_to_user(&frame->rs_info, info); - /* Create the ucontext. */ + /* Create the ucontext. */ err |= __put_user(0, &frame->rs_uc.uc_flags); err |= __put_user(NULL, &frame->rs_uc.uc_link); - err |= __put_user((void __user *)current->sas_ss_sp, - &frame->rs_uc.uc_stack.ss_sp); - err |= __put_user(sas_ss_flags(regs->regs[29]), - &frame->rs_uc.uc_stack.ss_flags); - err |= __put_user(current->sas_ss_size, - &frame->rs_uc.uc_stack.ss_size); + err |= __save_altstack(&frame->rs_uc.uc_stack, regs->regs[29]); err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext); err |= __copy_to_user(&frame->rs_uc.uc_sigmask, set, sizeof(*set)); diff --cc arch/mips/kernel/signal32.c index cae0b0e42a53,ad7c2be0c33d..672f5037b44f --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c @@@ -55,25 -55,12 +55,12 @@@ extern asmlinkage int fpu_emulator_rest typedef unsigned int __sighandler32_t; typedef void (*vfptr_t)(void); - struct sigaction32 { - unsigned int sa_flags; - __sighandler32_t sa_handler; - compat_sigset_t sa_mask; - }; - - /* IRIX compatible stack_t */ - typedef struct sigaltstack32 { - s32 ss_sp; - compat_size_t ss_size; - int ss_flags; - } stack32_t; - struct ucontext32 { - u32 uc_flags; - s32 uc_link; - stack32_t uc_stack; + u32 uc_flags; + s32 uc_link; + compat_stack_t uc_stack; struct sigcontext32 uc_mcontext; - compat_sigset_t uc_sigmask; /* mask last for extensibility */ + compat_sigset_t uc_sigmask; /* mask last for extensibility */ }; struct sigframe32 { @@@ -599,16 -507,10 +507,10 @@@ static int setup_rt_frame_32(void *sig_ /* Convert (siginfo_t -> compat_siginfo_t) and copy to user. */ err |= copy_siginfo_to_user32(&frame->rs_info, info); - /* Create the ucontext. */ + /* Create the ucontext. */ err |= __put_user(0, &frame->rs_uc.uc_flags); err |= __put_user(0, &frame->rs_uc.uc_link); - sp = (int) (long) current->sas_ss_sp; - err |= __put_user(sp, - &frame->rs_uc.uc_stack.ss_sp); - err |= __put_user(sas_ss_flags(regs->regs[29]), - &frame->rs_uc.uc_stack.ss_flags); - err |= __put_user(current->sas_ss_size, - &frame->rs_uc.uc_stack.ss_size); + err |= __compat_save_altstack(&frame->rs_uc.uc_stack, regs->regs[29]); err |= setup_sigcontext32(regs, &frame->rs_uc.uc_mcontext); err |= __copy_conv_sigset_to_user(&frame->rs_uc.uc_sigmask, set); diff --cc arch/mips/kernel/signal_n32.c index 7246e33721ae,5f4ef2ae6199..94ccb866495c --- a/arch/mips/kernel/signal_n32.c +++ b/arch/mips/kernel/signal_n32.c @@@ -50,20 -50,12 +50,12 @@@ extern int setup_sigcontext(struct pt_regs *, struct sigcontext __user *); extern int restore_sigcontext(struct pt_regs *, struct sigcontext __user *); - - /* IRIX compatible stack_t */ - typedef struct sigaltstack32 { - s32 ss_sp; - compat_size_t ss_size; - int ss_flags; - } stack32_t; - struct ucontextn32 { - u32 uc_flags; - s32 uc_link; - stack32_t uc_stack; + u32 uc_flags; + s32 uc_link; + compat_stack_t uc_stack; struct sigcontext uc_mcontext; - compat_sigset_t uc_sigmask; /* mask last for extensibility */ + compat_sigset_t uc_sigmask; /* mask last for extensibility */ }; struct rt_sigframe_n32 { @@@ -162,16 -115,10 +115,10 @@@ static int setup_rt_frame_n32(void *sig /* Create siginfo. */ err |= copy_siginfo_to_user32(&frame->rs_info, info); - /* Create the ucontext. */ + /* Create the ucontext. */ err |= __put_user(0, &frame->rs_uc.uc_flags); err |= __put_user(0, &frame->rs_uc.uc_link); - sp = (int) (long) current->sas_ss_sp; - err |= __put_user(sp, - &frame->rs_uc.uc_stack.ss_sp); - err |= __put_user(sas_ss_flags(regs->regs[29]), - &frame->rs_uc.uc_stack.ss_flags); - err |= __put_user(current->sas_ss_size, - &frame->rs_uc.uc_stack.ss_size); + err |= __compat_save_altstack(&frame->rs_uc.uc_stack, regs->regs[29]); err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext); err |= __copy_conv_sigset_to_user(&frame->rs_uc.uc_sigmask, set); diff --cc arch/mips/kernel/syscall.c index d7feee0c2739,b32466a1a1d2..b79d13f95bf0 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c @@@ -41,25 -41,19 +41,19 @@@ /* * For historic reasons the pipe(2) syscall on MIPS has an unusual calling - * convention. It returns results in registers $v0 / $v1 which means there + * convention. It returns results in registers $v0 / $v1 which means there * is no need for it to do verify the validity of a userspace pointer - * argument. Historically that used to be expensive in Linux. These days + * argument. Historically that used to be expensive in Linux. These days * the performance advantage is negligible. */ - asmlinkage int sysm_pipe(nabi_no_regargs volatile struct pt_regs regs) + asmlinkage int sysm_pipe(void) { int fd[2]; - int error, res; - - error = do_pipe_flags(fd, 0); - if (error) { - res = error; - goto out; - } - regs.regs[3] = fd[1]; - res = fd[0]; - out: - return res; + int error = do_pipe_flags(fd, 0); + if (error) + return error; + current_pt_regs()->regs[3] = fd[1]; + return fd[0]; } SYSCALL_DEFINE6(mips_mmap, unsigned long, addr, unsigned long, len, diff --cc arch/powerpc/Kconfig index 8818f08d648c,cf90f0526411..9624bf6f9b8a --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@@ -142,7 -144,8 +142,9 @@@ config PP select HAVE_MOD_ARCH_SPECIFIC select MODULES_USE_ELF_RELA select CLONE_BACKWARDS + select ARCH_USE_BUILTIN_BSWAP + select OLD_SIGSUSPEND + select OLD_SIGACTION if PPC32 config EARLY_PRINTK bool diff --cc arch/s390/Kconfig index b220e152aefa,ec12a3582ae9..904d61583f6e --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@@ -91,55 -129,19 +91,57 @@@ config S39 select ARCH_INLINE_WRITE_UNLOCK_BH select ARCH_INLINE_WRITE_UNLOCK_IRQ select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE - select HAVE_UID16 if 32BIT + select ARCH_SAVE_PAGE_KEYS if HIBERNATION select ARCH_WANT_IPC_PARSE_VERSION - select HAVE_ARCH_TRANSPARENT_HUGEPAGE if 64BIT + select BUILDTIME_EXTABLE_SORT + select CLONE_BACKWARDS2 + select GENERIC_CLOCKEVENTS + select GENERIC_CPU_DEVICES if !SMP + select GENERIC_KERNEL_THREAD select GENERIC_SMP_IDLE_THREAD select GENERIC_TIME_VSYSCALL_OLD - select GENERIC_CLOCKEVENTS - select KTIME_SCALAR if 32BIT + select HAVE_ALIGNED_STRUCT_PAGE if SLUB + select HAVE_ARCH_JUMP_LABEL if !MARCH_G5 + select HAVE_ARCH_MUTEX_CPU_RELAX select HAVE_ARCH_SECCOMP_FILTER + select HAVE_ARCH_TRACEHOOK + select HAVE_ARCH_TRANSPARENT_HUGEPAGE if 64BIT + select HAVE_BPF_JIT if 64BIT && PACK_STACK + select HAVE_CMPXCHG_DOUBLE + select HAVE_CMPXCHG_LOCAL + select HAVE_C_RECORDMCOUNT + select HAVE_DEBUG_KMEMLEAK + select HAVE_DYNAMIC_FTRACE + select HAVE_FTRACE_MCOUNT_RECORD + select HAVE_FUNCTION_GRAPH_TRACER + select HAVE_FUNCTION_TRACER + select HAVE_FUNCTION_TRACE_MCOUNT_TEST + select HAVE_KERNEL_BZIP2 + select HAVE_KERNEL_GZIP + select HAVE_KERNEL_LZMA + select HAVE_KERNEL_LZO + select HAVE_KERNEL_XZ + select HAVE_KPROBES + select HAVE_KRETPROBES + select HAVE_KVM if 64BIT + select HAVE_MEMBLOCK + select HAVE_MEMBLOCK_NODE_MAP select HAVE_MOD_ARCH_SPECIFIC + select HAVE_OPROFILE + select HAVE_PERF_EVENTS + select HAVE_REGS_AND_STACK_ACCESS_API + select HAVE_SYSCALL_TRACEPOINTS + select HAVE_SYSCALL_WRAPPERS + select HAVE_UID16 if 32BIT + select HAVE_VIRT_CPU_ACCOUNTING + select INIT_ALL_POSSIBLE + select KTIME_SCALAR if 32BIT select MODULES_USE_ELF_RELA - select CLONE_BACKWARDS2 - select OLD_SIGSUSPEND3 + select OLD_SIGACTION ++ select OLD_SIGSUSPEND3 + select SYSCTL_EXCEPTION_TRACE + select USE_GENERIC_SMP_HELPERS if SMP + select VIRT_CPU_ACCOUNTING config SCHED_OMIT_FRAME_POINTER def_bool y diff --cc arch/x86/Kconfig index 384f6f5e3d20,49fb44e95f3c..6a9383370311 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@@ -115,9 -113,9 +115,10 @@@ config X8 select MODULES_USE_ELF_REL if X86_32 select MODULES_USE_ELF_RELA if X86_64 select CLONE_BACKWARDS if X86_32 + select ARCH_USE_BUILTIN_BSWAP - select GENERIC_SIGALTSTACK - select ARCH_USE_BUILTIN_BSWAP + select OLD_SIGSUSPEND3 if X86_32 || IA32_EMULATION + select OLD_SIGACTION if X86_32 + select COMPAT_OLD_SIGACTION if IA32_EMULATION config INSTRUCTION_DECODER def_bool y