[PATCH] sparc32: signal: Fix stack trampoline for RT signals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The stack trampoline generated by the sparc32 native version of
setup_rt_frame() calls sigreturn(), not rt_sigreturn().  This will
crash the task if it's ever used.  (glibc sets its own restorer, so
was not affected.)

The sparc64 compat implementation has the right syscall number.

This is untested; I have no way to run a sparc32 kernel.

Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
---
 arch/sparc/kernel/signal_32.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/kernel/signal_32.c b/arch/sparc/kernel/signal_32.c
index 3b005b6c3e0f..c85654cdc2c5 100644
--- a/arch/sparc/kernel/signal_32.c
+++ b/arch/sparc/kernel/signal_32.c
@@ -401,8 +401,8 @@ static int setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs,
 	else {
 		regs->u_regs[UREG_I7] = (unsigned long)(&(sf->insns[0]) - 2);
 
-		/* mov __NR_sigreturn, %g1 */
-		err |= __put_user(0x821020d8, &sf->insns[0]);
+		/* mov __NR_rt_sigreturn, %g1 */
+		err |= __put_user(0x82102065, &sf->insns[0]);
 
 		/* t 0x10 */
 		err |= __put_user(0x91d02010, &sf->insns[1]);

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux