diff -urpN -X /home/fletch/.diff.exclude 222-stack_usage_check/arch/i386/Kconfig 223-4k_stacks/arch/i386/Kconfig --- 222-stack_usage_check/arch/i386/Kconfig Sat Jun 14 20:20:49 2003 +++ 223-4k_stacks/arch/i386/Kconfig Sat Jun 14 20:20:49 2003 @@ -752,6 +752,16 @@ config HIGHPTE low memory. Setting this option will put user-space page table entries in high memory. +config 4K_STACK + bool "Use smaller 4k per-task stacks" + help + This option will shrink the kernel's per-task stack from 8k to + 4k. This will greatly increase your chance of overflowing it. + But, if you use the per-cpu interrupt stacks as well, your chances + go way down. Also try the CONFIG_X86_STACK_CHECK overflow + detection. It is much more reliable than the currently in-kernel + version. + config MATH_EMULATION bool "Math emulation" ---help--- diff -urpN -X /home/fletch/.diff.exclude 222-stack_usage_check/include/asm-i386/thread_info.h 223-4k_stacks/include/asm-i386/thread_info.h --- 222-stack_usage_check/include/asm-i386/thread_info.h Sat Jun 14 20:20:49 2003 +++ 223-4k_stacks/include/asm-i386/thread_info.h Sat Jun 14 20:20:49 2003 @@ -63,10 +63,16 @@ struct thread_info { * * preempt_count needs to be 1 initially, until the scheduler is functional. */ -#define THREAD_ORDER 1 +#ifdef CONFIG_4K_STACK +#define THREAD_ORDER 0 +#define STACK_WARN 0x200 +#define STACK_PANIC 0x100 +#else +#define THREAD_ORDER 1 +#define STACK_WARN ((THREAD_SIZE)>>1) +#define STACK_PANIC 0x100 +#endif #define INIT_THREAD_SIZE THREAD_SIZE -#define STACK_PANIC 0x200ul -#define STACK_WARN ((THREAD_SIZE)>>1) #ifndef __ASSEMBLY__