Re: Kernel Stack

Brian Gerst (bgerst@quark.vpplus.com)
Fri, 09 Apr 1999 12:17:58 -0400


Livia Catarina Soares wrote:
> 1- Where is the kernel stack ??
> Is it above the address "0xC0000000" in the kernel memory ??

There is one kernel stack for every user process, and it is mapped in
kernel memory (above PAGE_OFFSET). Note that even in an interrupt
context, the kernel stack of whatever user process was running is used.

> 2- Which is the size of the kernel stack ??

It is fixed at 8k - sizeof (struct task_struct). This is the reason
recursion in the kernel should be avoided.

> 3- Is there some system call that inform the kernel stack free size ??

No. Normally when in user mode the kernel stack should be empty.

-- 

Brian Gerst

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/