Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356762
b: refs/heads/master
c: ea93a6e
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Feb 3, 2013
1 parent 92eec26 commit 1bc008f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 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: 50b3c9e30a53172b627081e7129c03ef53f27319
refs/heads/master: ea93a6e2e73c5a1a8d1d60098f1ca5618fd5aca1
1 change: 0 additions & 1 deletion trunk/arch/unicore32/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ config UNICORE32
select ARCH_WANT_FRAME_POINTERS
select GENERIC_IOMAP
select MODULES_USE_ELF_REL
select GENERIC_SIGALTSTACK
help
UniCore-32 is 32-bit Instruction Set Architecture,
including a series of low-power-consumption RISC chip
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/unicore32/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,11 @@ ENTRY(sys_rt_sigreturn)
b __sys_rt_sigreturn
ENDPROC(sys_rt_sigreturn)

ENTRY(sys_sigaltstack)
ldw r2, [sp+], #S_OFF + S_SP
b do_sigaltstack
ENDPROC(sys_sigaltstack)

__INIT

/*
Expand Down
12 changes: 10 additions & 2 deletions trunk/arch/unicore32/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ asmlinkage int __sys_rt_sigreturn(struct pt_regs *regs)
if (restore_sigframe(regs, &frame->sig))
goto badframe;

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

return regs->UCreg_00;
Expand Down Expand Up @@ -264,6 +265,7 @@ static int setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
{
struct rt_sigframe __user *frame =
get_sigframe(ka, regs, sizeof(*frame));
stack_t stack;
int err = 0;

if (!frame)
Expand All @@ -273,7 +275,13 @@ static int setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,

err |= __put_user(0, &frame->sig.uc.uc_flags);
err |= __put_user(NULL, &frame->sig.uc.uc_link);
err |= __save_altstack(&frame->sig.uc.uc_stack, regs->UCreg_sp);

memset(&stack, 0, sizeof(stack));
stack.ss_sp = (void __user *)current->sas_ss_sp;
stack.ss_flags = sas_ss_flags(regs->UCreg_sp);
stack.ss_size = current->sas_ss_size;
err |= __copy_to_user(&frame->sig.uc.uc_stack, &stack, sizeof(stack));

err |= setup_sigframe(&frame->sig, regs, set);
if (err == 0)
err |= setup_return(regs, ka, frame->sig.retcode, frame, usig);
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/x86/kernel/entry_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,6 @@ ENTRY(stub_execve)
SAVE_REST
FIXUP_TOP_OF_STACK %r11
call sys_execve
RESTORE_TOP_OF_STACK %r11
movq %rax,RAX(%rsp)
RESTORE_REST
jmp int_ret_from_sys_call
Expand Down

0 comments on commit 1bc008f

Please sign in to comment.