]> git.karo-electronics.de Git - karo-tx-linux.git/commit
sparc: Allow handling signals when stack is corrupted.
authorDavid S. Miller <davem@davemloft.net>
Sun, 21 Aug 2011 00:14:54 +0000 (17:14 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 7 Nov 2011 20:31:49 +0000 (12:31 -0800)
commit910098ec61a6b248c7bd4da4cd40bf76330fd268
tree6807241e20ad62de0c64b7cd5f3e72d3c871dec4
parent3fe9d0a904fb32444a9c7f009c3644176b5728a2
sparc: Allow handling signals when stack is corrupted.

commit 5598473a5b40c47a8c5349dd2c2630797169cf1a upstream.

If we can't push the pending register windows onto the user's stack,
we disallow signal delivery even if the signal would be delivered on a
valid seperate signal stack.

Add a register window save area in the signal frame, and store any
unsavable windows there.

On sigreturn, if any windows are still queued up in the signal frame,
try to push them back onto the stack and if that fails we kill the
process immediately.

This allows the debug/tst-longjmp_chk2 glibc test case to pass.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/sparc/include/asm/sigcontext.h
arch/sparc/kernel/Makefile
arch/sparc/kernel/signal32.c
arch/sparc/kernel/signal_32.c
arch/sparc/kernel/signal_64.c
arch/sparc/kernel/sigutil.h [new file with mode: 0644]
arch/sparc/kernel/sigutil_32.c [new file with mode: 0644]
arch/sparc/kernel/sigutil_64.c [new file with mode: 0644]