4K stacks for everyone?
Posted Sep 9, 2005 1:06 UTC (Fri) by
mcelrath (guest, #8094)
Parent article:
4K stacks for everyone?
I noticed the other day while configuring my 2.6.13 kernel that there is now an experimental option to use register arguments for function calls. I imagine this should seriously reduce stack usage. Perhaps a default 4k stack should require register arguments.
But this just begs the question...does the kernel really have no means of detecting or handling stack overflows? That just seems like bad design. Can't the stack be set up so that if it is over-written it will trigger a page fault, and the kernel could handle it? gcc/libc can allocate more stack pages for userspace programs if needed, but why not the kernel?
(
Log in to post comments)