Junio C Hamano <[email protected]> writes:
> 1. As a stop gap measure, so that your Linux kernel work can
> continue, please bump MAX_NEEDS definition in upload-pack.c
> from 256 to a bit higher. That controls the number of
> 40-letter SHA1 given to underlying rev-list via execvp(), so
> it cannot be _too_ big like 1M, lest it exceeds the exec
> argument buffer limit.
Hmph. I was reading linux-2.6/fs/exec.c::copy_strings(), but I
do not see any such size limit (other than exceeding the total
machine memory size, probably reported by alloc_page() failing)
imposed there. Am I looking at the wrong place?
On Wed, Oct 05, 2005 at 02:38:42PM -0700, Junio C Hamano wrote:
> Hmph. I was reading linux-2.6/fs/exec.c::copy_strings(), but I
> do not see any such size limit (other than exceeding the total
> machine memory size, probably reported by alloc_page() failing)
> imposed there. Am I looking at the wrong place?
well at least the len of argv is limited by ~32K (i386) by:
bprm->p = PAGE_SIZE*MAX_ARG_PAGES-sizeof(void *);
...
bprm->argc = count(argv, bprm->p / sizeof(void *));
--
Vincent Hanquez
On Wed, 5 Oct 2005, Junio C Hamano wrote:
>
> Hmph. I was reading linux-2.6/fs/exec.c::copy_strings(), but I
> do not see any such size limit (other than exceeding the total
> machine memory size, probably reported by alloc_page() failing)
> imposed there. Am I looking at the wrong place?
Look for "MAX_ARG_PAGES".
Ie the limit is about 128kB by default (32 pages). Note that that includes
not just arguments, but environment.
Linus