diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2014-06-04 06:21:54 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2014-06-04 06:21:54 +0000 |
commit | 722f33f118cbd4a31e805d93474c2c362a1b3e0f (patch) | |
tree | 718bc8cc29fc4f7c1a75952f26bc84a28d1224ee /sys/powerpc | |
parent | fc10e3fcebb7e4d401153e98deb35d7cfa651646 (diff) | |
download | FreeBSD-src-722f33f118cbd4a31e805d93474c2c362a1b3e0f.zip FreeBSD-src-722f33f118cbd4a31e805d93474c2c362a1b3e0f.tar.gz |
MFC r266778:
Repair nested signal handling on PowerPC. The signal trampoline code
was not allocating space for the parameter save area in the stack frame.
If the compiler chose to save the argument to the signal handler on the
stack, it would overwrite the first 32 bits of the sigaction struct with
it, corrupting it for a subsequent invocation.
PR: powerpc/183040
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/powerpc/sigcode32.S | 4 | ||||
-rw-r--r-- | sys/powerpc/powerpc/sigcode64.S | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/powerpc/powerpc/sigcode32.S b/sys/powerpc/powerpc/sigcode32.S index 0cdbf9f..0236182 100644 --- a/sys/powerpc/powerpc/sigcode32.S +++ b/sys/powerpc/powerpc/sigcode32.S @@ -45,9 +45,9 @@ */ .globl CNAME(sigcode32),CNAME(szsigcode32) CNAME(sigcode32): - addi 1,1,-16 /* reserved space for callee */ + addi 1,1,-20 /* reserved space for callee */ blrl - addi 3,1,16+SF_UC /* restore sp, and get &frame->sf_uc */ + addi 3,1,20+SF_UC /* restore sp, and get &frame->sf_uc */ li 0,SYS_sigreturn sc /* sigreturn(scp) */ li 0,SYS_exit diff --git a/sys/powerpc/powerpc/sigcode64.S b/sys/powerpc/powerpc/sigcode64.S index c1bf8b2..ec8e2b2 100644 --- a/sys/powerpc/powerpc/sigcode64.S +++ b/sys/powerpc/powerpc/sigcode64.S @@ -45,7 +45,7 @@ */ .globl CNAME(sigcode64),CNAME(szsigcode64) CNAME(sigcode64): - addi 1,1,-48 /* reserved space for callee */ + addi 1,1,-112 /* reserved space for callee */ mflr 2 /* resolve function descriptor */ ld 0,0(2) ld 2,8(2) @@ -53,7 +53,7 @@ CNAME(sigcode64): blrl - addi 3,1,48+SF_UC /* restore sp, and get &frame->sf_uc */ + addi 3,1,112+SF_UC /* restore sp, and get &frame->sf_uc */ li 0,SYS_sigreturn sc /* sigreturn(scp) */ li 0,SYS_exit |