path: root/arch/parisc/Kconfig.debug
diff options
authorHelge Deller <>2013-05-07 19:28:52 +0000
committerHelge Deller <>2013-05-07 21:34:07 +0200
commit9372450cc22d185f708e5cc3557cf991be4b7dc5 (patch)
treef537999c1134549b14fce04a020e6e4d23d03d4c /arch/parisc/Kconfig.debug
parentc207a76bf155cb5cf24cf849c08f6555e9180594 (diff)
parisc: add kernel stack overflow check
Add the CONFIG_DEBUG_STACKOVERFLOW config option to enable checks to detect kernel stack overflows. Stack overflows can not be detected reliable since we do not want to introduce too much overhead. Instead, during irq processing in do_cpu_irq_mask() we check kernel stack usage of the interrupted kernel process. Kernel threads can be easily detected by checking the value of space register 7 (sr7) which is zero when running inside the kernel. Since THREAD_SIZE is 16k and PAGE_SIZE is 4k, reduce the alignment of the init thread to the lower value (PAGE_SIZE) in the kernel vmlinux.ld.S linker script. Signed-off-by: Helge Deller <>
Diffstat (limited to 'arch/parisc/Kconfig.debug')
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/parisc/Kconfig.debug b/arch/parisc/Kconfig.debug
index bc989e522a04..08a332f6ee87 100644
--- a/arch/parisc/Kconfig.debug
+++ b/arch/parisc/Kconfig.debug
@@ -13,3 +13,14 @@ config DEBUG_RODATA
If in doubt, say "N".
+ bool "Check for stack overflows"
+ default y
+ depends on DEBUG_KERNEL
+ ---help---
+ Say Y here if you want to check the overflows of kernel, IRQ
+ and exception stacks. This option will cause messages of the
+ stacks in detail when free stack space drops below a certain
+ limit.
+ If in doubt, say "N".