]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Sun, 21 Aug 2011 00:14:54 +0000 (17:14 -0700)
commitcefe2acb10895b494cd1cba50cee1aa91d8ab5e5
tree514474c6359d158fe1adc7477dbcf64c326b1770
parentc22a4e5a892c3cb6fae6afc9ba4fa4356ee4b845
sparc: Allow handling signals when stack is corrupted.

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>
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]