diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2020-08-27 17:47:36 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-14 17:04:49 -0700 |
commit | b6b9b67d67f0962e9e976c2d3623a992ef7f30b0 (patch) | |
tree | 6077b353176a83bfe05dea290f1b5a5d3f9b92f5 /arch/sparc | |
parent | 4cc8ca08ed0934cfcb9a4f3998119ea954780b02 (diff) | |
download | linux-b6b9b67d67f0962e9e976c2d3623a992ef7f30b0.tar.bz2 |
sparc32: signal: Fix stack trampoline for RT signals
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@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/signal_32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/kernel/signal_32.c b/arch/sparc/kernel/signal_32.c index e08d294d63e4..76b934241e09 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]); |