Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965120AbWJKAFb (ORCPT ); Tue, 10 Oct 2006 20:05:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964976AbWJKAFb (ORCPT ); Tue, 10 Oct 2006 20:05:31 -0400 Received: from smtp-out.google.com ([216.239.33.17]:33555 "EHLO smtp-out.google.com") by vger.kernel.org with ESMTP id S1030716AbWJKAF3 (ORCPT ); Tue, 10 Oct 2006 20:05:29 -0400 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=received:message-id:date:from:to:subject:cc:mime-version:content-type; b=DPl6XoiO3VsBGHDzbgUsfZsrfLMbQ7Ozzwp7KwMXj7ML2XKcKWWiU83H10CJH7Brx KQhIVC7IOinEJ/W7WQSyQ== Message-ID: <65dd6fd50610101705t3db93a72sc0847cd120aa05d3@mail.gmail.com> Date: Tue, 10 Oct 2006 17:05:09 -0700 From: "Ollie Wild" To: linux-kernel@vger.kernel.org, parisc-linux@lists.parisc-linux.org Subject: Removing MAX_ARG_PAGES (request for comments/assistance) Cc: "Linus Torvalds" , "Arjan van de Ven" , "Ingo Molnar" , linux-mm@kvack.org, "Andrew Morton" , "Andi Kleen" , linux-arch@vger.kernel.org, "David Howells" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_8824_9060361.1160525109224" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 38994 Lines: 538 ------=_Part_8824_9060361.1160525109224 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_8824_9060361.1160525109224 Content-Type: text/x-patch; name=no_MAX_ARG_PAGES.patch; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: base64 X-Attachment-Id: f_et4xt20l Content-Disposition: attachment; filename="no_MAX_ARG_PAGES.patch" ZGlmZiAtLWdpdCBhL2FyY2gveDg2XzY0L2lhMzIvaWEzMl9iaW5mbXQuYyBiL2FyY2gveDg2XzY0 L2lhMzIvaWEzMl9iaW5mbXQuYwppbmRleCA4MmVmMTgyLi4yZTVhOTM0IDEwMDY0NAotLS0gYS9h cmNoL3g4Nl82NC9pYTMyL2lhMzJfYmluZm10LmMKKysrIGIvYXJjaC94ODZfNjQvaWEzMi9pYTMy X2JpbmZtdC5jCkBAIC0yNzksOSArMjc5LDYgQEAgI2RlZmluZSBleGl0X2VsZl9iaW5mbXQJCQll eGl0X2VsZjMyX2JpbgogI2RlZmluZSBsb2FkX2VsZl9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525109224-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/