mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: max arguments for exec
@ 2001-09-27 15:48 Carl Spalletta
  2001-09-27 16:53 ` Kiril Vidimce
  0 siblings, 1 reply; 6+ messages in thread
From: Carl Spalletta @ 2001-09-27 15:48 UTC (permalink / raw)
  To: vkire; +Cc: linux-kernel


On Wed, 26 Sep 2001, Kiril Vidimce wrote:
 
> Yeah, I know, but we would like to avoid building a
custom kernel. If
> we do end up going this route, I wonder if there is
a limit for
> MAX_ARG_PAGES. Any idea? I think 128 pages (512K)
would be sufficient
> for our needs.

kiril, 

I am guessing that you want to avoid a custom kernel
in order that your programs shall be portable.

So, I am having a hard time understanding why putting
the command line args into a file instead of on the
command line, in a way similar to grep and many other
programs:
 
"fgrep -F patternfile"

would not answer the case.

Is there any absolute need to have so many args passed
to exec from the command line?


__________________________________________________
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: max arguments for exec
  2001-09-27 15:48 max arguments for exec Carl Spalletta
@ 2001-09-27 16:53 ` Kiril Vidimce
  0 siblings, 0 replies; 6+ messages in thread
From: Kiril Vidimce @ 2001-09-27 16:53 UTC (permalink / raw)
  To: Carl Spalletta; +Cc: linux-kernel

On Thu, 27 Sep 2001, Carl Spalletta wrote:
> kiril, 
> 
> I am guessing that you want to avoid a custom kernel
> in order that your programs shall be portable.
> 
> So, I am having a hard time understanding why putting
> the command line args into a file instead of on the
> command line, in a way similar to grep and many other
> programs:
>  
> "fgrep -F patternfile"
> 
> would not answer the case.
> 
> Is there any absolute need to have so many args passed
> to exec from the command line?

We are using third party software over which we have no 
control. So, it's not up to us.

KV
--
  ___________________________________________________________________
  Studio Tools                                        vkire@pixar.com
  Pixar Animation Studios                        http://www.pixar.com/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: max arguments for exec
  2001-09-27  3:23   ` Kiril Vidimce
@ 2001-09-27  8:18     ` Ingo Molnar
  0 siblings, 0 replies; 6+ messages in thread
From: Ingo Molnar @ 2001-09-27  8:18 UTC (permalink / raw)
  To: Kiril Vidimce; +Cc: Keith Owens, linux-kernel


On Wed, 26 Sep 2001, Kiril Vidimce wrote:

> Yeah, I know, but we would like to avoid building a custom kernel. If
> we do end up going this route, I wonder if there is a limit for
> MAX_ARG_PAGES. Any idea? I think 128 pages (512K) would be sufficient
> for our needs.

be careful with MAX_ARG_PAGES, because struct binprm is allocated on the
kernel stack, so if it's too big, the kernel stack will overflow in
unexpected places. A realistic limit is 1-2 MB, that causes a 1-2 KB
kernel stack footprint.

(ob'plug: or use the patch i posted, the size of struct binprm is constant
and small there :-)

	Ingo


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: max arguments for exec
  2001-09-27  2:27 ` Keith Owens
@ 2001-09-27  3:23   ` Kiril Vidimce
  2001-09-27  8:18     ` Ingo Molnar
  0 siblings, 1 reply; 6+ messages in thread
From: Kiril Vidimce @ 2001-09-27  3:23 UTC (permalink / raw)
  To: Keith Owens; +Cc: linux-kernel

On Thu, 27 Sep 2001, Keith Owens wrote:
> On Wed, 26 Sep 2001 14:25:05 -0700 (PDT), 
> Kiril Vidimce <vkire@pixar.com> wrote:
> >Is there any way to reconfigure the kernel at runtime to change the
> >limit for arguments passed during an exec? I guess I am looking for
> >something similar to systune ncargs under IRIX. I found this thread
> >in the archives:
> >
> >http://uwsg.iu.edu/hypermail/linux/kernel/0003.0/0160.html
> >
> >The only suggestion was to patch and recompile the kernel. I looked
> >into sysctl and I couldn't find an appropriate argument to tweak.
> 
> It is controlled by MAX_ARG_PAGES in include/linux/binfmts.h.  Change
> and recompile the kernel, it is not dynamically tunable in Linux.

Yeah, I know, but we would like to avoid building a custom kernel.
If we do end up going this route, I wonder if there is a limit for 
MAX_ARG_PAGES. Any idea? I think 128 pages (512K) would be sufficient 
for our needs.

KV
--
  ___________________________________________________________________
  Studio Tools                                        vkire@pixar.com
  Pixar Animation Studios                        http://www.pixar.com/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: max arguments for exec
  2001-09-26 21:25 Kiril Vidimce
@ 2001-09-27  2:27 ` Keith Owens
  2001-09-27  3:23   ` Kiril Vidimce
  0 siblings, 1 reply; 6+ messages in thread
From: Keith Owens @ 2001-09-27  2:27 UTC (permalink / raw)
  To: Kiril Vidimce; +Cc: linux-kernel

On Wed, 26 Sep 2001 14:25:05 -0700 (PDT), 
Kiril Vidimce <vkire@pixar.com> wrote:
>Is there any way to reconfigure the kernel at runtime to change the
>limit for arguments passed during an exec? I guess I am looking for
>something similar to systune ncargs under IRIX. I found this thread
>in the archives:
>
>http://uwsg.iu.edu/hypermail/linux/kernel/0003.0/0160.html
>
>The only suggestion was to patch and recompile the kernel. I looked
>into sysctl and I couldn't find an appropriate argument to tweak.

It is controlled by MAX_ARG_PAGES in include/linux/binfmts.h.  Change
and recompile the kernel, it is not dynamically tunable in Linux.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* max arguments for exec
@ 2001-09-26 21:25 Kiril Vidimce
  2001-09-27  2:27 ` Keith Owens
  0 siblings, 1 reply; 6+ messages in thread
From: Kiril Vidimce @ 2001-09-26 21:25 UTC (permalink / raw)
  To: linux-kernel


Is there any way to reconfigure the kernel at runtime to change the
limit for arguments passed during an exec? I guess I am looking for
something similar to systune ncargs under IRIX. I found this thread
in the archives:

http://uwsg.iu.edu/hypermail/linux/kernel/0003.0/0160.html

The only suggestion was to patch and recompile the kernel. I looked
into sysctl and I couldn't find an appropriate argument to tweak.

Thanks for any info,
KV
--
  ___________________________________________________________________
  Studio Tools                                        vkire@pixar.com
  Pixar Animation Studios                        http://www.pixar.com/


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-09-27 16:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-27 15:48 max arguments for exec Carl Spalletta
2001-09-27 16:53 ` Kiril Vidimce
  -- strict thread matches above, loose matches on Subject: below --
2001-09-26 21:25 Kiril Vidimce
2001-09-27  2:27 ` Keith Owens
2001-09-27  3:23   ` Kiril Vidimce
2001-09-27  8:18     ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®