[lkml]   [2000]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: User-mode linux stack overflow: could be generic problem
From said:
> Even with this patch, the overflow is 808 bytes (without the patch
> it's 1232 bytes).

I was mulling over some other changes that would have saved another 256 bytes,
but those don't look like they would help. Try the patch below. It
essentially gives up and lets the stack occupy half of the lower page.

Also, could you look at the stack pointer at each frame, to see if you are
encountering any stack hogs in the generic kernel? In a different situation,
I found devfs putting a 3K structure on the stack.


--- arch/um/kernel/process_kern.c~ Mon Sep 25 15:34:25 2000
+++ arch/um/kernel/process_kern.c Fri Oct 6 12:07:28 2000
@@ -711,8 +711,13 @@

void check_stack_overflow(void *ptr)
- if((((unsigned long) ptr) & PAGE_MASK) == (unsigned long) current)
- panic("Stack overflowed onto current_task page");
+ unsigned long addr, c;
+ addr = (unsigned long) ptr;
+ c = (unsigned long) current;
+ if(addr - c < PAGE_SIZE / 2)
+ panic("Stack overflowed well into the current_task page");

int singlestepping(void *t)

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

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