From 1e974c21661db89b30eb13040fc9ab99a83b6492 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 23 Dec 2012 02:43:08 -0500 Subject: hexagon: switch to generic sigaltstack Signed-off-by: Al Viro --- arch/hexagon/Kconfig | 1 + arch/hexagon/kernel/signal.c | 15 +-------------- 2 files changed, 2 insertions(+), 14 deletions(-) (limited to 'arch/hexagon') diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig index 0744f7d7b1f..3e6e27c11f9 100644 --- a/arch/hexagon/Kconfig +++ b/arch/hexagon/Kconfig @@ -31,6 +31,7 @@ config HEXAGON select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS_BROADCAST select MODULES_USE_ELF_RELA + select GENERIC_SIGALTSTACK ---help--- Qualcomm Hexagon is a processor architecture designed for high performance and low power across a wide variety of applications. diff --git a/arch/hexagon/kernel/signal.c b/arch/hexagon/kernel/signal.c index fe0d1373165..46ebd479466 100644 --- a/arch/hexagon/kernel/signal.c +++ b/arch/hexagon/kernel/signal.c @@ -247,12 +247,6 @@ void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags) /* * Architecture-specific wrappers for signal-related system calls */ -asmlinkage int sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss) -{ - struct pt_regs *regs = current_pt_regs(); - - return do_sigaltstack(uss, uoss, regs->r29); -} asmlinkage int sys_rt_sigreturn(void) { @@ -288,14 +282,7 @@ asmlinkage int sys_rt_sigreturn(void) */ regs->syscall_nr = __NR_rt_sigreturn; - /* - * If we were meticulous, we'd only call this if we knew that - * we were actually going to use an alternate stack, and we'd - * consider any error to be fatal. What we do here, in common - * with many other architectures, is call it blindly and only - * consider the -EFAULT return case to be proof of a problem. - */ - if (do_sigaltstack(&frame->uc.uc_stack, NULL, pt_psp(regs)) == -EFAULT) + if (restore_altstack(&frame->uc.uc_stack)) goto badframe; return 0; -- cgit v1.2.3 From da36f98a52e3a299fa067967e2928e9d53d3102f Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 23 Dec 2012 02:46:34 -0500 Subject: hexagon: don't leave ->uc_stack uninitialized it's used on rt_sigreturn(2) Signed-off-by: Al Viro --- arch/hexagon/kernel/signal.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/hexagon') diff --git a/arch/hexagon/kernel/signal.c b/arch/hexagon/kernel/signal.c index 46ebd479466..60fa2ca3202 100644 --- a/arch/hexagon/kernel/signal.c +++ b/arch/hexagon/kernel/signal.c @@ -125,6 +125,7 @@ static int setup_rt_frame(int signr, struct k_sigaction *ka, siginfo_t *info, err |= __put_user(0x5400c004, &frame->tramp[1]); err |= setup_sigcontext(regs, &frame->uc.uc_mcontext); err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); + err |= __save_altstack(&frame->uc.uc_stack, user_stack_pointer(regs)); if (err) goto sigsegv; -- cgit v1.2.3 From d64008a8f30e0b381b292788ec6f3ee509b3bb40 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 25 Nov 2012 23:12:10 -0500 Subject: burying unused conditionals __ARCH_WANT_SYS_RT_SIGACTION, __ARCH_WANT_SYS_RT_SIGSUSPEND, __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND, __ARCH_WANT_COMPAT_SYS_SCHED_RR_GET_INTERVAL - not used anymore CONFIG_GENERIC_{SIGALTSTACK,COMPAT_RT_SIG{ACTION,QUEUEINFO,PENDING,PROCMASK}} - can be assumed always set. --- arch/hexagon/Kconfig | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/hexagon') diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig index 3e6e27c11f9..0744f7d7b1f 100644 --- a/arch/hexagon/Kconfig +++ b/arch/hexagon/Kconfig @@ -31,7 +31,6 @@ config HEXAGON select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS_BROADCAST select MODULES_USE_ELF_RELA - select GENERIC_SIGALTSTACK ---help--- Qualcomm Hexagon is a processor architecture designed for high performance and low power across a wide variety of applications. -- cgit v1.2.3