Re: [PATCH] Restrict stack space reservation to rlimit

2010-02-08 Thread Michael Neuling
In message <20100208145240.fb58.a69d9...@jp.fujitsu.com> you wrote: > > > > > > > > Hi, > > > > > > > > > Why do we need page size independent stack size? It seems to have > > > > > compatibility breaking risk. > > > > > > > > I don't think so. The current behaviour is clearly wrong, we dont n

Re: [PATCH] Restrict stack space reservation to rlimit

2010-02-07 Thread KOSAKI Motohiro
> On Mon, Feb 8, 2010 at 2:05 PM, KOSAKI Motohiro > wrote: > >> --- linux-2.6-ozlabs.orig/fs/exec.c > >> +++ linux-2.6-ozlabs/fs/exec.c > >> @@ -627,10 +627,13 @@ int setup_arg_pages(struct linux_binprm > >>                       goto out_unlock; > >>       } > >> > >> +     stack_base = min(EXTRA

Re: [PATCH] Restrict stack space reservation to rlimit

2010-02-07 Thread Américo Wang
On Mon, Feb 8, 2010 at 2:05 PM, KOSAKI Motohiro wrote: >> --- linux-2.6-ozlabs.orig/fs/exec.c >> +++ linux-2.6-ozlabs/fs/exec.c >> @@ -627,10 +627,13 @@ int setup_arg_pages(struct linux_binprm >>                       goto out_unlock; >>       } >> >> +     stack_base = min(EXTRA_STACK_VM_PAGES *

Re: [PATCH] Restrict stack space reservation to rlimit

2010-02-07 Thread KOSAKI Motohiro
> > Hi, > > > I didn't discuss which behavior is better. Michael said he want to apply > > his patch to 2.6.32 & 2.6.33. stable tree never accept the breaking > > compatibility patch. > > > > Your answer doesn't explain why can't we wait it until next merge window. > > > > > > btw, personally,

Re: [PATCH] Restrict stack space reservation to rlimit

2010-02-07 Thread KOSAKI Motohiro
> > > > > > Hi, > > > > > > > Why do we need page size independent stack size? It seems to have > > > > compatibility breaking risk. > > > > > > I don't think so. The current behaviour is clearly wrong, we dont need a > > > 16x larger stack just because you went from a 4kB to a 64kB base page >

[PATCH] Restrict stack space reservation to rlimit

2010-02-07 Thread Michael Neuling
> > > > Hi, > > > > > Why do we need page size independent stack size? It seems to have > > > compatibility breaking risk. > > > > I don't think so. The current behaviour is clearly wrong, we dont need a > > 16x larger stack just because you went from a 4kB to a 64kB base page > > size. The use

Re: [PATCH] Restrict stack space reservation to rlimit

2010-02-07 Thread KOSAKI Motohiro
Hi > apkm, linus: this or something like it needs to go into 2.6.33 (& 32) to > fix 'ulimit -s'. "fix ulimit -s" is too cool explanation ;-) we are not ESPer. please consider to provide what bug is exist. > Mikey > > [PATCH] Restrict stack space re

Re: [PATCH] Restrict stack space reservation to rlimit

2010-02-07 Thread Anton Blanchard
Hi, > I didn't discuss which behavior is better. Michael said he want to apply > his patch to 2.6.32 & 2.6.33. stable tree never accept the breaking > compatibility patch. > > Your answer doesn't explain why can't we wait it until next merge window. > > > btw, personally, I like page size inde

Re: [PATCH] Restrict stack space reservation to rlimit

2010-02-07 Thread KOSAKI Motohiro
> > Hi, > > > Why do we need page size independent stack size? It seems to have > > compatibility breaking risk. > > I don't think so. The current behaviour is clearly wrong, we dont need a > 16x larger stack just because you went from a 4kB to a 64kB base page > size. The user application stac

Re: [PATCH] Restrict stack space reservation to rlimit

2010-02-07 Thread Anton Blanchard
Hi, > Why do we need page size independent stack size? It seems to have > compatibility breaking risk. I don't think so. The current behaviour is clearly wrong, we dont need a 16x larger stack just because you went from a 4kB to a 64kB base page size. The user application stack usage is the sam

[PATCH] Restrict stack space reservation to rlimit

2010-02-07 Thread Michael Neuling
When reserving stack space for a new process, make sure we're not attempting to allocate more than rlimit allows. Also, reserve the same stack size independent of page size. This fixes a bug cause by b6a2fea39318e43fee84fa7b0b90d68bed92d2ba "mm: variable length argument support" and unmasked by

[PATCH] Restrict stack space reservation to rlimit

2010-02-07 Thread Michael Neuling
apkm, linus: this or something like it needs to go into 2.6.33 (& 32) to fix 'ulimit -s'. Mikey [PATCH] Restrict stack space reservation to rlimit When reserving stack space for a new process, make sure we're not attempting to allocate more than rlimit allows. Also, res