This stack check implementation leverages the compiler's profiling (gcc -p)
authorMarc Fiuczynski <mef@cs.princeton.edu>
Tue, 14 Dec 2004 19:13:38 +0000 (19:13 +0000)
committerMarc Fiuczynski <mef@cs.princeton.edu>
Tue, 14 Dec 2004 19:13:38 +0000 (19:13 +0000)
commita51d4a641708759ecd27f407f8d1205ffdc39866
tree2b78930cc34ac9fae4f1e8ddaa9c91b4d5af11a1
parent1ceceab10d08076d58cb86424098b6839ce7eb4e
This stack check implementation leverages the compiler's profiling (gcc -p)
support to determine precisely when there is a stack overflow.  The compiler
generates a call to the special function 'mcount' in the prologue of each
function.  This special 'mcount' function checks whether the stack has
grown beyond STACK_WARN size; and, if so, it will call the stack_overflowed
function, which generates a stack trace.  If the stack has grown to STACK_PANIC
size, the stack_overflowed function will panic() the system.

The hope is that with this support we can track down precisely the execution
context when the stack overflows.
Makefile
arch/i386/Kconfig
arch/i386/boot/compressed/misc.c
arch/i386/kernel/entry.S
arch/i386/kernel/i386_ksyms.c
arch/i386/kernel/init_task.c
arch/i386/kernel/process.c
configs/kernel-2.6.8-i686-planetlab.config
include/asm-i386/thread_info.h