]> git.baikalelectronics.ru Git - kernel.git/commit
sparc64: Make corrupted user stacks more debuggable.
authorDavid Miller <davem@redhat.com>
Fri, 26 Oct 2018 03:36:46 +0000 (20:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Oct 2018 22:04:41 +0000 (15:04 -0700)
commita96ed9efc2f3ee82d0dd005bcc4d40b315f61897
tree1e4d71d14473c440a48f1fbfdcd465cf478fc2f4
parent387c84b8a493f38121ef3fc7bf74ad6f574a7052
sparc64: Make corrupted user stacks more debuggable.

Right now if we get a corrupted user stack frame we do a
do_exit(SIGILL) which is not helpful.

If under a debugger, this behavior causes the inferior process to
exit.  So the register and other state cannot be examined at the time
of the event.

Instead, conditionally log a rate limited kernel log message and then
force a SIGSEGV.

With bits and ideas borrowed (as usual) from powerpc.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/include/asm/switch_to_64.h
arch/sparc/kernel/process_64.c
arch/sparc/kernel/rtrap_64.S
arch/sparc/kernel/signal32.c
arch/sparc/kernel/signal_64.c