Re: max arguments for exec

Ingo Molnar (
Thu, 27 Sep 2001 10:18:24 +0200 (CEST)

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 :-)


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