lkml.org 
[lkml]   [1999]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Kernel Stack
On Fri, 9 Apr 1999, Brian Gerst wrote:

> 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.
> ^^^^^^^^^^^^

The kernel stack is a kernel stack. It is not associated with a
user process. If this was not true, a user could crash the system.

#include <stdio.h>

int main()
{
__asm__(
"nop \n \
movl $0,%esp \n"
);
for(;;)
;
}

All interrupts are handled on the kernel stack.

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.2.5 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.


-
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/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.042 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site