Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356687
b: refs/heads/master
c: e8d9ef0
h: refs/heads/master
i:
  356685: aa70719
  356683: dd0b793
  356679: 3b2291c
  356671: 9e023ce
v: v3
  • Loading branch information
Al Viro committed Feb 3, 2013
1 parent 161a623 commit 4223daa
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da36f98a52e3a299fa067967e2928e9d53d3102f
refs/heads/master: e8d9ef09df5f86f564a2ab6e8f1397121b1bad66
1 change: 0 additions & 1 deletion trunk/arch/hexagon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
16 changes: 14 additions & 2 deletions trunk/arch/hexagon/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ 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;

Expand Down Expand Up @@ -248,6 +247,12 @@ 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)
{
Expand Down Expand Up @@ -283,7 +288,14 @@ asmlinkage int sys_rt_sigreturn(void)
*/
regs->syscall_nr = __NR_rt_sigreturn;

if (restore_altstack(&frame->uc.uc_stack))
/*
* 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)
goto badframe;

return 0;
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/ia64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ config IA64
select GENERIC_TIME_VSYSCALL_OLD
select HAVE_MOD_ARCH_SPECIFIC
select MODULES_USE_ELF_RELA
select GENERIC_SIGALTSTACK
default y
help
The Itanium Processor Family is Intel's 64-bit successor to
Expand Down
19 changes: 3 additions & 16 deletions trunk/arch/ia64/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@
# define GET_SIGSET(k,u) __get_user((k)->sig[0], &(u)->sig[0])
#endif

asmlinkage long
sys_sigaltstack (const stack_t __user *uss, stack_t __user *uoss, long arg2,
long arg3, long arg4, long arg5, long arg6, long arg7,
struct pt_regs regs)
{
return do_sigaltstack(uss, uoss, regs.r12);
}

static long
restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr)
{
Expand Down Expand Up @@ -208,11 +200,8 @@ ia64_rt_sigreturn (struct sigscratch *scr)
printk("SIG return (%s:%d): sp=%lx ip=%lx\n",
current->comm, current->pid, scr->pt.r12, scr->pt.cr_iip);
#endif
/*
* It is more difficult to avoid calling this function than to
* call it and ignore errors.
*/
do_sigaltstack(&sc->sc_stack, NULL, scr->pt.r12);
if (restore_altstack(&sc->sc_stack))
goto give_sigsegv;
return retval;

give_sigsegv:
Expand Down Expand Up @@ -376,9 +365,7 @@ setup_frame (int sig, struct k_sigaction *ka, siginfo_t *info, sigset_t *set,

err |= copy_siginfo_to_user(&frame->info, info);

err |= __put_user(current->sas_ss_sp, &frame->sc.sc_stack.ss_sp);
err |= __put_user(current->sas_ss_size, &frame->sc.sc_stack.ss_size);
err |= __put_user(sas_ss_flags(scr->pt.r12), &frame->sc.sc_stack.ss_flags);
err |= __save_altstack(&frame->sc.sc_stack, scr->pt.r12);
err |= setup_sigcontext(&frame->sc, set, scr);

if (unlikely(err))
Expand Down

0 comments on commit 4223daa

Please sign in to comment.