]> git.baikalelectronics.ru Git - kernel.git/commit
csky: Fixup calltrace panic
authorGuo Ren <guoren@linux.alibaba.com>
Wed, 13 May 2020 07:15:25 +0000 (15:15 +0800)
committerGuo Ren <guoren@linux.alibaba.com>
Wed, 13 May 2020 09:55:06 +0000 (17:55 +0800)
commit2252b0e31e9fbc28cac3966b985894da4a6a2f26
tree450a798836c2658ff1a2b7fce73bbc5bd59df9af
parent65cf33885653772f7c5ae593e3ce6def8363539d
csky: Fixup calltrace panic

The implementation of show_stack will panic with wrong fp:

addr    = *fp++;

because the fp isn't checked properly.

The current implementations of show_stack, wchan and stack_trace
haven't been designed properly, so just deprecate them.

This patch is a reference to riscv's way, all codes are modified from
arm's. The patch is passed with:

 - cat /proc/<pid>/stack
 - cat /proc/<pid>/wchan
 - echo c > /proc/sysrq-trigger

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
arch/csky/Kconfig
arch/csky/Makefile
arch/csky/include/asm/ptrace.h
arch/csky/include/asm/thread_info.h
arch/csky/kernel/Makefile
arch/csky/kernel/dumpstack.c [deleted file]
arch/csky/kernel/process.c
arch/csky/kernel/stacktrace.c