aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/signal.c10
-rw-r--r--arch/powerpc/kernel/signal_32.c4
-rw-r--r--arch/powerpc/kernel/signal_64.c2
3 files changed, 5 insertions, 11 deletions
diff --git a/arch/powerpc/kernel/signal.c b/arch/powerpc/kernel/signal.c
index aa9b048c4766..cf8c7e4e0b21 100644
--- a/arch/powerpc/kernel/signal.c
+++ b/arch/powerpc/kernel/signal.c
@@ -31,20 +31,14 @@ int show_unhandled_signals = 1;
31/* 31/*
32 * Allocate space for the signal frame 32 * Allocate space for the signal frame
33 */ 33 */
34void __user * get_sigframe(struct k_sigaction *ka, unsigned long sp, 34void __user *get_sigframe(struct ksignal *ksig, unsigned long sp,
35 size_t frame_size, int is_32) 35 size_t frame_size, int is_32)
36{ 36{
37 unsigned long oldsp, newsp; 37 unsigned long oldsp, newsp;
38 38
39 /* Default to using normal stack */ 39 /* Default to using normal stack */
40 oldsp = get_clean_sp(sp, is_32); 40 oldsp = get_clean_sp(sp, is_32);
41 41 oldsp = sigsp(oldsp, ksig);
42 /* Check for alt stack */
43 if ((ka->sa.sa_flags & SA_ONSTACK) &&
44 current->sas_ss_size && !on_sig_stack(oldsp))
45 oldsp = (current->sas_ss_sp + current->sas_ss_size);
46
47 /* Get aligned frame */
48 newsp = (oldsp - frame_size) & ~0xFUL; 42 newsp = (oldsp - frame_size) & ~0xFUL;
49 43
50 /* Check access */ 44 /* Check access */
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
index aa0af8853d59..b171001698ff 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -994,7 +994,7 @@ int handle_rt_signal32(struct ksignal *ksig, sigset_t *oldset,
994 994
995 /* Set up Signal Frame */ 995 /* Set up Signal Frame */
996 /* Put a Real Time Context onto stack */ 996 /* Put a Real Time Context onto stack */
997 rt_sf = get_sigframe(&ksig->ka, get_tm_stackpointer(regs), sizeof(*rt_sf), 1); 997 rt_sf = get_sigframe(ksig, get_tm_stackpointer(regs), sizeof(*rt_sf), 1);
998 addr = rt_sf; 998 addr = rt_sf;
999 if (unlikely(rt_sf == NULL)) 999 if (unlikely(rt_sf == NULL))
1000 goto badframe; 1000 goto badframe;
@@ -1417,7 +1417,7 @@ int handle_signal32(struct ksignal *ksig, sigset_t *oldset, struct pt_regs *regs
1417 unsigned long tramp; 1417 unsigned long tramp;
1418 1418
1419 /* Set up Signal Frame */ 1419 /* Set up Signal Frame */
1420 frame = get_sigframe(&ksig->ka, get_tm_stackpointer(regs), sizeof(*frame), 1); 1420 frame = get_sigframe(ksig, get_tm_stackpointer(regs), sizeof(*frame), 1);
1421 if (unlikely(frame == NULL)) 1421 if (unlikely(frame == NULL))
1422 goto badframe; 1422 goto badframe;
1423 sc = (struct sigcontext __user *) &frame->sctx; 1423 sc = (struct sigcontext __user *) &frame->sctx;
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
index 115d11041cf7..2cb0c94cafa5 100644
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
@@ -714,7 +714,7 @@ int handle_rt_signal64(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs
714 unsigned long newsp = 0; 714 unsigned long newsp = 0;
715 long err = 0; 715 long err = 0;
716 716
717 frame = get_sigframe(&ksig->ka, get_tm_stackpointer(regs), sizeof(*frame), 0); 717 frame = get_sigframe(ksig, get_tm_stackpointer(regs), sizeof(*frame), 0);
718 if (unlikely(frame == NULL)) 718 if (unlikely(frame == NULL))
719 goto badframe; 719 goto badframe;
720 720