[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1405951409-16953-38-git-send-email-richard@sigma-star.at>
Date: Mon, 21 Jul 2014 16:03:23 +0200
From: Richard Weinberger <richard@...ma-star.at>
To: akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
Richard Weinberger <richard@....at>, geert@...ux-m68k.org,
linux-m68k@...ts.linux-m68k.org
Subject: [PATCH 37/43] m68k: Use sigsp()
From: Richard Weinberger <richard@....at>
Use sigsp() instead of the open coded variant.
Signed-off-by: Richard Weinberger <richard@....at>
---
arch/m68k/kernel/signal.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c
index c8e6fa8..967a8b7 100644
--- a/arch/m68k/kernel/signal.c
+++ b/arch/m68k/kernel/signal.c
@@ -835,18 +835,10 @@ static inline int rt_setup_ucontext(struct ucontext __user *uc, struct pt_regs *
}
static inline void __user *
-get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size)
+get_sigframe(struct ksignal *ksig, size_t frame_size)
{
- unsigned long usp;
-
- /* Default to using normal stack. */
- usp = rdusp();
+ unsigned long usp = sigsp(rdusp(), ksig);
- /* This is the X/Open sanctioned signal stack switching. */
- if (ka->sa.sa_flags & SA_ONSTACK) {
- if (!sas_ss_flags(usp))
- usp = current->sas_ss_sp + current->sas_ss_size;
- }
return (void __user *)((usp - frame_size) & -8UL);
}
@@ -866,7 +858,7 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
return -EFAULT;
}
- frame = get_sigframe(&ksig->ka, regs, sizeof(*frame) + fsize);
+ frame = get_sigframe(ksig, sizeof(*frame) + fsize);
if (fsize)
err |= copy_to_user (frame + 1, regs + 1, fsize);
@@ -951,7 +943,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
return -EFAULT;
}
- frame = get_sigframe(&ksig->ka, regs, sizeof(*frame));
+ frame = get_sigframe(ksig, sizeof(*frame));
if (fsize)
err |= copy_to_user (&frame->uc.uc_extra, regs + 1, fsize);
--
1.8.4.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists