Re: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-17 Thread Ingo Molnar
* Pavel Machek <[EMAIL PROTECTED]> wrote: > Hi! > > > This patch-set aims at removing the current limit on argv+env space > > aka. MAX_ARG_PAGES. > > Thanks a lot for solving this properly. I have been upping current > limits to some insane ammounts to work around this. seconded! I have

Re: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-17 Thread Pavel Machek
Hi! > This patch-set aims at removing the current limit on argv+env space aka. > MAX_ARG_PAGES. Thanks a lot for solving this properly. I have been upping current limits to some insane ammounts to work around this. Pavel -- (english)

Re: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-17 Thread Pavel Machek
Hi! This patch-set aims at removing the current limit on argv+env space aka. MAX_ARG_PAGES. Thanks a lot for solving this properly. I have been upping current limits to some insane ammounts to work around this. Pavel -- (english)

Re: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-17 Thread Ingo Molnar
* Pavel Machek [EMAIL PROTECTED] wrote: Hi! This patch-set aims at removing the current limit on argv+env space aka. MAX_ARG_PAGES. Thanks a lot for solving this properly. I have been upping current limits to some insane ammounts to work around this. seconded! I have tried the

RE: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-15 Thread Luck, Tony
> > > A good heuristic, though, might be to limit > > > argument size to a percentage (say 25%) of maximum stack size and > > > validate this inside copy_strings(). > > > > This seems to do: > > Looks good. Me too. As I increase the number of arguments, I now have a smooth cutover from "works"

Re: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-15 Thread Ollie Wild
On 6/15/07, Peter Zijlstra <[EMAIL PROTECTED]> wrote: On Thu, 2007-06-14 at 13:58 -0700, Ollie Wild wrote: > A good heuristic, though, might be to limit > argument size to a percentage (say 25%) of maximum stack size and > validate this inside copy_strings(). This seems to do: Looks good.

Re: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-15 Thread Peter Zijlstra
On Thu, 2007-06-14 at 13:58 -0700, Ollie Wild wrote: > A good heuristic, though, might be to limit > argument size to a percentage (say 25%) of maximum stack size and > validate this inside copy_strings(). This seems to do: Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]> --- fs/exec.c |

Re: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-15 Thread Peter Zijlstra
On Thu, 2007-06-14 at 13:58 -0700, Ollie Wild wrote: A good heuristic, though, might be to limit argument size to a percentage (say 25%) of maximum stack size and validate this inside copy_strings(). This seems to do: Signed-off-by: Peter Zijlstra [EMAIL PROTECTED] --- fs/exec.c | 17

Re: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-15 Thread Ollie Wild
On 6/15/07, Peter Zijlstra [EMAIL PROTECTED] wrote: On Thu, 2007-06-14 at 13:58 -0700, Ollie Wild wrote: A good heuristic, though, might be to limit argument size to a percentage (say 25%) of maximum stack size and validate this inside copy_strings(). This seems to do: Looks good.

RE: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-15 Thread Luck, Tony
A good heuristic, though, might be to limit argument size to a percentage (say 25%) of maximum stack size and validate this inside copy_strings(). This seems to do: Looks good. Me too. As I increase the number of arguments, I now have a smooth cutover from works to Arg list too

Re: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-14 Thread Peter Zijlstra
On Thu, 2007-06-14 at 13:58 -0700, Ollie Wild wrote: > > @@ -1385,6 +1401,10 @@ int do_execve(char * filename, > > goto out; > > bprm->argv_len = env_p - bprm->p; > > > > + retval = expand_arg_vma(bprm); > > + if (retval < 0) > > + goto out; > > +

Re: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-14 Thread Ollie Wild
@@ -1385,6 +1401,10 @@ int do_execve(char * filename, goto out; bprm->argv_len = env_p - bprm->p; + retval = expand_arg_vma(bprm); + if (retval < 0) + goto out; + retval = search_binary_handler(bprm,regs); if (retval >= 0) {

RE: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-14 Thread Peter Zijlstra
On Thu, 2007-06-14 at 11:22 -0700, Luck, Tony wrote: > > > Interesting. If you're exceeding your stack ulimit, you should be > > > seeing either an "argument list too long" message or getting a > > > SIGSEGV. Have you tried bypassing wc and piping the output straight > > > to a file? > > > > I

RE: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-14 Thread Luck, Tony
> > Interesting. If you're exceeding your stack ulimit, you should be > > seeing either an "argument list too long" message or getting a > > SIGSEGV. Have you tried bypassing wc and piping the output straight > > to a file? > > I think it sends SIGKILL on failure paths. Setting stack limit to

Re: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-14 Thread Peter Zijlstra
On Wed, 2007-06-13 at 23:23 -0700, Ollie Wild wrote: > On 6/13/07, Luck, Tony <[EMAIL PROTECTED]> wrote: > > Above 5Mbytes, I started seeing problems. The line/word/char > > counts from "wc" started being "0 0 0". Not sure if this is > > a problem in "wc" dealing with a single line >5MBytes, or

Re: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-14 Thread Ollie Wild
On 6/13/07, Luck, Tony <[EMAIL PROTECTED]> wrote: Above 5Mbytes, I started seeing problems. The line/word/char counts from "wc" started being "0 0 0". Not sure if this is a problem in "wc" dealing with a single line >5MBytes, or some other problem (possibly I was exceeding the per-process

Re: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-14 Thread Ollie Wild
On 6/13/07, Luck, Tony [EMAIL PROTECTED] wrote: Above 5Mbytes, I started seeing problems. The line/word/char counts from wc started being 0 0 0. Not sure if this is a problem in wc dealing with a single line 5MBytes, or some other problem (possibly I was exceeding the per-process stack limit

Re: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-14 Thread Peter Zijlstra
On Wed, 2007-06-13 at 23:23 -0700, Ollie Wild wrote: On 6/13/07, Luck, Tony [EMAIL PROTECTED] wrote: Above 5Mbytes, I started seeing problems. The line/word/char counts from wc started being 0 0 0. Not sure if this is a problem in wc dealing with a single line 5MBytes, or some other

RE: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-14 Thread Luck, Tony
Interesting. If you're exceeding your stack ulimit, you should be seeing either an argument list too long message or getting a SIGSEGV. Have you tried bypassing wc and piping the output straight to a file? I think it sends SIGKILL on failure paths. Setting stack limit to unlimited I

RE: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-14 Thread Peter Zijlstra
On Thu, 2007-06-14 at 11:22 -0700, Luck, Tony wrote: Interesting. If you're exceeding your stack ulimit, you should be seeing either an argument list too long message or getting a SIGSEGV. Have you tried bypassing wc and piping the output straight to a file? I think it sends

Re: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-14 Thread Ollie Wild
@@ -1385,6 +1401,10 @@ int do_execve(char * filename, goto out; bprm-argv_len = env_p - bprm-p; + retval = expand_arg_vma(bprm); + if (retval 0) + goto out; + retval = search_binary_handler(bprm,regs); if (retval = 0) {

Re: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-14 Thread Peter Zijlstra
On Thu, 2007-06-14 at 13:58 -0700, Ollie Wild wrote: @@ -1385,6 +1401,10 @@ int do_execve(char * filename, goto out; bprm-argv_len = env_p - bprm-p; + retval = expand_arg_vma(bprm); + if (retval 0) + goto out; + retval =

RE: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-13 Thread Luck, Tony
> This patch-set aims at removing the current limit on argv+env space aka. > MAX_ARG_PAGES. Running with this patch shows that /bin/bash has some unpleasant O(n^2) performance issues with long argument lists. I made a 1Mbyte file full of pathnames, then timed the execution of: $ /bin/echo `cat

RE: [patch 0/3] no MAX_ARG_PAGES -v2

2007-06-13 Thread Luck, Tony
This patch-set aims at removing the current limit on argv+env space aka. MAX_ARG_PAGES. Running with this patch shows that /bin/bash has some unpleasant O(n^2) performance issues with long argument lists. I made a 1Mbyte file full of pathnames, then timed the execution of: $ /bin/echo `cat