On Thu, May 24, 2001 at 05:08:40PM -0600, Andreas Dilger wrote:
> I'm curious about this stack checker.  Does it check for a single
> stack allocation >= 1024 bytes, or does it also check for several
> individual, smaller allocations which total >= 1024 bytes inside
> a single function?  That would be equally useful.

At one time someone had a script to grep objdump -S vmlinux for the
stack allocations generated by gcc and check them. It found a few 
cases. It is easy to rewrite, as they are very regular instruction 
patterns at the beginning of functions (at least when you ignore variable 
length stack arrays, which do not seem to be common in the kernel anyways) 

> 
> On a side note, does anyone know if the kernel does checking if the
> stack overflowed at any time?  It is hard to use Dawson's tools to
> verify call paths because of interrupts and such, but I wonder what
> happens when the kernel stack overflows - OOPS, or silent corruption?

You normally get a silent hang or worse a stack fault exception 
(which linux/x86 without kdb cannot recover from) which gives you instant 
reboot.
The ikd patches contain a stack overflow checker for runtime.


-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to