diff options
author | Helge Deller <deller@gmx.de> | 2013-05-07 19:28:52 +0000 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2013-05-07 21:34:07 +0200 |
commit | 9372450cc22d185f708e5cc3557cf991be4b7dc5 (patch) | |
tree | f537999c1134549b14fce04a020e6e4d23d03d4c /arch/parisc/include/asm/thread_info.h | |
parent | c207a76bf155cb5cf24cf849c08f6555e9180594 (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 <deller@gmx.de>
Diffstat (limited to 'arch/parisc/include/asm/thread_info.h')
-rw-r--r-- | arch/parisc/include/asm/thread_info.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/parisc/include/asm/thread_info.h b/arch/parisc/include/asm/thread_info.h index 6182832e5b6..540c88fa8f8 100644 --- a/arch/parisc/include/asm/thread_info.h +++ b/arch/parisc/include/asm/thread_info.h @@ -40,7 +40,7 @@ struct thread_info { /* thread information allocation */ -#define THREAD_SIZE_ORDER 2 +#define THREAD_SIZE_ORDER 2 /* PA-RISC requires at least 16k stack */ /* Be sure to hunt all references to this down when you change the size of * the kernel stack */ #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) |