Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356689
b: refs/heads/master
c: 08d4f65
h: refs/heads/master
i:
  356687: 4223daa
v: v3
  • Loading branch information
Al Viro committed Feb 3, 2013
1 parent b76dd4d commit 13cf75c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 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: 1084f751d437a1823787285517f1161935483569
refs/heads/master: 08d4f65352f9464f1dd7d65d0bc27d57abf3d161
1 change: 0 additions & 1 deletion trunk/arch/m32r/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ config M32R
select GENERIC_ATOMIC64
select ARCH_USES_GETTIMEOFFSET
select MODULES_USE_ELF_RELA
select GENERIC_SIGALTSTACK

config SBUS
bool
Expand Down
16 changes: 14 additions & 2 deletions trunk/arch/m32r/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@

#define DEBUG_SIG 0

asmlinkage int
sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
unsigned long r2, unsigned long r3, unsigned long r4,
unsigned long r5, unsigned long r6, struct pt_regs *regs)
{
return do_sigaltstack(uss, uoss, regs->spu);
}


/*
* Do a signal return; undo the signal stack.
*/
Expand Down Expand Up @@ -104,7 +113,7 @@ sys_rt_sigreturn(unsigned long r0, unsigned long r1,
if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &result))
goto badframe;

if (restore_altstack(&frame->uc.uc_stack))
if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->spu) == -EFAULT)
goto badframe;

return result;
Expand Down Expand Up @@ -204,7 +213,10 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
/* Create the ucontext. */
err |= __put_user(0, &frame->uc.uc_flags);
err |= __put_user(0, &frame->uc.uc_link);
err |= __save_altstack(&frame->uc.uc_stack, regs->spu);
err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
err |= __put_user(sas_ss_flags(regs->spu),
&frame->uc.uc_stack.ss_flags);
err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, set->sig[0]);
err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
if (err)
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/m68k/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ config M68K
select HAVE_MOD_ARCH_SPECIFIC
select MODULES_USE_ELF_REL
select MODULES_USE_ELF_RELA
select GENERIC_SIGALTSTACK

config RWSEM_GENERIC_SPINLOCK
bool
Expand Down
16 changes: 3 additions & 13 deletions trunk/arch/m68k/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,6 @@ sys_sigaction(int sig, const struct old_sigaction __user *act,
return ret;
}

asmlinkage int
sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss)
{
return do_sigaltstack(uss, uoss, rdusp());
}


/*
* Do a signal return; undo the signal stack.
*
Expand Down Expand Up @@ -765,8 +758,9 @@ rt_restore_ucontext(struct pt_regs *regs, struct switch_stack *sw,
err |= __get_user(temp, &uc->uc_formatvec);

err |= rt_restore_fpu_state(uc);
err |= restore_altstack(&uc->uc_stack);

if (err || do_sigaltstack(&uc->uc_stack, NULL, usp) == -EFAULT)
if (err)
goto badframe;

if (mangle_kernel_stack(regs, temp, &uc->uc_extra))
Expand Down Expand Up @@ -1014,11 +1008,7 @@ static int setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info,
/* Create the ucontext. */
err |= __put_user(0, &frame->uc.uc_flags);
err |= __put_user(NULL, &frame->uc.uc_link);
err |= __put_user((void __user *)current->sas_ss_sp,
&frame->uc.uc_stack.ss_sp);
err |= __put_user(sas_ss_flags(rdusp()),
&frame->uc.uc_stack.ss_flags);
err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
err |= __save_altstack(&frame->uc.uc_stack, rdusp());
err |= rt_setup_ucontext(&frame->uc, regs);
err |= copy_to_user (&frame->uc.uc_sigmask, set, sizeof(*set));

Expand Down

0 comments on commit 13cf75c

Please sign in to comment.