lkml.org 
[lkml]   [1999]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: tracing a kernel stack corruption
From
Date
getienne@globalserve.net writes:

> two questions:
>
> 1. a function call a function which call another function and so on. how
> can we be sure not to go beyond 7k ? there is a automatic detection of
> this, a log/oops or other ?

A crash occurs.

You just have to be careful, kernel programming is something very different
from user mode programming. If your algorithms are too complex
consider moving them into user space.

>
> 2. why only 7k when a typical kernel uses 2meg ?
Because the kernel stack is per process/thread, and the unuswappable
overhead per process must be minimized. 2.0 has only 4k on i386.

Note that you can't use the full 4k/7k, because you have to leave
some room for interrupts and bottom halves.

-Andi
--
This is like TV. I don't like TV.

-
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:50    [W:0.033 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site