Re: 4k stacks in 2.6

Andi Kleen
2004-05-26T19:32:39Z

"David S. Miller" <davem@redhat.com> writes:

>> Change gcc to catch stack overflows before the fact and disallow
>> module load unless modules have those checks as well.

It's impossible to do anything but panic, so it's not too helpful
in practice. You can only do better for interrupts
(not handle an interrupt when the stack is too low).

> That's easy, just enable profiling then implement a suitable
> _mcount that checks for stack overflow. I bet someone has done
> this already.

I did it for x86-64 a long time ago. Should be easy to port to i386
too.

ftp://ftp.x86-64.org/pub/linux/debug/stackcheck-1

-Andi