[lkml]   [2001]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [CHECKER] large stack variables (>=1K) in 2.4.4 and 2.4.4-ac8
Andi Kleen wrote:
> On Fri, May 25, 2001 at 07:52:02AM -0400, Brian Gerst wrote:
> > Actually, you will never get a stack fault exception, since with a flat
> > stack segment you can never get a limit violation. All you will do is
> > corrupt the data in task struct and cause an oops later on when the
> > kernel tries to use the task struct. There are only two ways to
> > properly trap a kernel stack overflow:
> In my experience the stack pointer eventually gets corrupted and starts
> pointing to some unmapped area, which gives you a stack fault (admittedly
> a backtrace is a bit hard after that)

You mean a double fault. #SS is only called when there is a limit
violation on the stack segment or the stack segment is not present. I
guess you could get a limit violation if it tried to wrap around below
0, but you would get a page fault first. An unmapped page will always
cause a page fault, but since the stack is still invalid, it would then
cause a double fault.


Brian Gerst
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:53    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean