There's at least one patch floating around to do that; we've used it
to help track down some stack overflow problems.
Does 2.5 use a separate interrupt stack? (Excuse my ignorance; I
haven't been paying attention.) Total stack-page usage in the 2.4
model, at any rate, is the sum of the task struct, the usage of any
task-level thread (system calls, pretty much), any softirq (including
the network protocol & routing handlers, and any netfilter modules),
and some number of possibly-nested hard interrupts.
That adds up.
One thing that would help (aside from separate interrupt stacks)
would be a guard page below the stack. That wouldn't require any
physical memory to be reserved, and would provide positive indication
of stack overflow without significant runtime overhead.
-- /Jonathan Lundell. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/