Hi, A few months back, there was some discussion about increasing MAX_ARG_PAGES (http://thread.gmane.org/gmane.linux.kernel/418858). Since this is a problem which Google seems to bump into on a regular basis -- we just keep jacking up the limit -- I thought I'd have a stab at implementing the preferred solution as outlined by Linus. I've attached a patch which replaces the pages array from the linux_binprm struct with a stack vm_area added to the new process's mm_struct. The region grows using the normal page fault / stack extension mechanism. Since the vm_area is swappable -- which I've confirmed via testing -- we don't have to worry about memory starvation. I've tested this on the um/i386, i386, and x86_64 architectures with the elf and script binfmts. I'd like to get feedback from the Linux community. If anyone would like to test/implement the areas I've missed, I'd greatly appreciate it. Some outstanding issues / concerns: - I haven't addressed the CONFIG_STACK_GROWSUP (parisc) case. Would someone on the parisc list be willing to have a go at this? Grant Grundler has offered to provide me access to hardware, but I'd prefer to let a pa-risc guru have a go. - I haven't tested this on a NOMMU architecture. Could someone please validate this? - What, if any command line limits should we enforce? The do_execve() callchain has plenty of hooks where the calling process can sleep, so CPU starvation shouldn't be a problem. Memory consumption is limited by the RLIMIT_STACK setting. Note, however, that I'm not providing any guarantee on the availability of space for the actual stack. - Inside setup_arg_pages(), I have to move the stack region. Different linux_binfmt handlers place it in different locations relative to STACK_TOP, and STACK_TOP itself may have different values depending on the personality of the executable. When executing scripts, the arg strings need to be accessed before we know which binary format is being executed, so we can't generally make the correct determination beforehand. - There are bunch of linux_binfmt handlers which are either obsolete or specific to particular platforms. Would someone be willing to look at these? Thanks, Ollie