[lkml]   [2010]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectStack size protection broken on ppc64
On recent ppc64 kernels, limiting the stack (using 'ulimit -s blah') is
now more restrictive than it was before. On 2.6.31 with 4k pages I
could run 'ulimit -s 16; /usr/bin/test' without a problem. Now with
mainline, even 'ulimit -s 64; /usr/bin/test' gets killed.

Using 64k pages is even worse. I can't even run '/bin/ls' with a 1MB
stack (ulimit -s 1024; /bin/ls). Hence, it seems new kernels are too
restrictive, rather than the old kernels being too liberal.

I've not tested with any other architectures.

Bisecting, I found that this is the culprit (which is in 2.6.32)

commit fc63cf237078c86214abcb2ee9926d8ad289da9b
Author: Anton Blanchard <>
exec: setup_arg_pages() fails to return errors

Looking at the patch, it's probably just unmasking a preexisting issue.
The error path for expand_stack() (and others) was modified to:
ret = expand_stack(vma, stack_base);
if (ret)
ret = -EFAULT;

- return 0;
+ return ret;

So previously expand_stack errors were not returned correctly by
setup_arg_pages, but now they are.

Any clues how to fix this?


 \ /
  Last update: 2010-02-06 01:45    [W:0.338 / U:34.280 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site