Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 120940
b: refs/heads/master
c: 666ac7b
h: refs/heads/master
v: v3
  • Loading branch information
Hiroshi Shimamoto authored and Ingo Molnar committed Nov 23, 2008
1 parent c2258ee commit 25bd398
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5c9b3a0c7b8be3cdef3d7418f0a49127e7cdc998
refs/heads/master: 666ac7be049ec290625e65d5922ff59f7bdec527
9 changes: 9 additions & 0 deletions trunk/arch/x86/kernel/signal_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ sys_sigaction(int sig, const struct old_sigaction __user *act,
return ret;
}

#ifdef CONFIG_X86_32
asmlinkage int sys_sigaltstack(unsigned long bx)
{
/*
Expand All @@ -137,6 +138,14 @@ asmlinkage int sys_sigaltstack(unsigned long bx)

return do_sigaltstack(uss, uoss, regs->sp);
}
#else /* !CONFIG_X86_32 */
asmlinkage long
sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
struct pt_regs *regs)
{
return do_sigaltstack(uss, uoss, regs->sp);
}
#endif /* CONFIG_X86_32 */

#define COPY(x) { \
err |= __get_user(regs->x, &sc->x); \
Expand Down
15 changes: 15 additions & 0 deletions trunk/arch/x86/kernel/signal_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,27 @@
# define FIX_EFLAGS __FIX_EFLAGS
#endif

#ifdef CONFIG_X86_32
asmlinkage int sys_sigaltstack(unsigned long bx)
{
/*
* This is needed to make gcc realize it doesn't own the
* "struct pt_regs"
*/
struct pt_regs *regs = (struct pt_regs *)&bx;
const stack_t __user *uss = (const stack_t __user *)bx;
stack_t __user *uoss = (stack_t __user *)regs->cx;

return do_sigaltstack(uss, uoss, regs->sp);
}
#else /* !CONFIG_X86_32 */
asmlinkage long
sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
struct pt_regs *regs)
{
return do_sigaltstack(uss, uoss, regs->sp);
}
#endif /* CONFIG_X86_32 */

#define COPY(x) { \
err |= __get_user(regs->x, &sc->x); \
Expand Down

0 comments on commit 25bd398

Please sign in to comment.