Re: kernel stack torture

Drew Eckhardt (drew@poohsticks.org)
Fri, 16 Feb 1996 14:46:59 -0700


In message <911566A761C@rkdvmks1.ngate.uni-regensburg.de>, Ulrich.Windl@rz.uni-
regensburg.de writes:
>On 14 Feb 96 at 23:42, Gerard Roudier wrote:
>
>[about kernel stack overflows]
>
>Wouldn't it be best to grwo the kernel stack instead of panic-ing? I
>don't know it this is easy, but it sounds a good idea. One could also
>watch how much kernel stack is actually used.
>
>Ulrich

Under i86 Linux, drivers could count on the fact that any memory address
they were handed had equivallent virtual and bus addresses. However,
the stack is fairly small, you don't know what other interrupts have fired to
squeeze you, and therefore it would be silly to allocate your DMA buffers
there; which is the only thing requiring this assumption to hold true.

Therefore, we can probably put the kernel stack in virtual memory,
and grow it at will; keeping the changes entirely local to the VM
code. changing anything too much pain.

I'd also suggest keeping a printk() simillar to the panic message
everytime a kernel stack grows beyond the largest one, since this is
probably indicative of a design problem or bug.

-- 
You too can commit two felonies by using this .sig:
Eat bite fuck suck gobble nibble chew; nipple bosum hairpie finger-fuck screw
moose-piss cat-pud orangutan-tit; sheep-pussy camel-crack pig-a-lie-in-shit