[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Kernel stack for a process
On Sat, Sep 07, 2002 at 04:03:41AM -0600, Joseph A. Knapka wrote:
> I also suspect (though I do not know this for certain)
> that the kernel is smart enough to detect kernel-stack
> overflow and kill the offending process.
Nope. Things just start acting funny. :) If you are lucky you get a
panic soon.
> trivial: just keep a read-only PTE at the end of the
> kernel stack, and if anything tries to write
> there, take a page fault, notice that it's adjacent
> to the task stack, and kill the process.
Iterate over $n processes .. where $n is disturbingly large on some
systems. I agree it would be a nice debugging option to have :) but
i doubt it would ever be added to the mainstream kernel.
--
It seems the power has been robbed from the founding fathers and is now
firmly in the hand of the funding fathers -- Rik van Riel
PGP signature