[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070807190357.GA31139@aepfle.de>
Date: Tue, 7 Aug 2007 21:03:57 +0200
From: Olaf Hering <olaf@...fle.de>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: linux-kernel@...r.kernel.org, parisc-linux@...ts.parisc-linux.org,
linux-mm@...ck.org, linux-arch@...r.kernel.org,
Ollie Wild <aaw@...gle.com>, Andrew Morton <akpm@...l.org>,
Ingo Molnar <mingo@...e.hu>, Andi Kleen <ak@...e.de>
Subject: Re: [patch 3/3] mm: variable length argument support
On Wed, Jun 13, Peter Zijlstra wrote:
> From: Ollie Wild <aaw@...gle.com>
>
> Remove the arg+env limit of MAX_ARG_PAGES by copying the strings directly
> from the old mm into the new mm.
> +++ linux-2.6-2/include/linux/binfmts.h 2007-06-13 11:52:46.000000000 +0200
> @@ -6,11 +6,13 @@
> struct pt_regs;
>
> /*
> - * MAX_ARG_PAGES defines the number of pages allocated for arguments
> - * and envelope for the new program. 32 should suffice, this gives
> - * a maximum env+arg of 128kB w/4KB pages!
> + * These are the maximum length and maximum number of strings passed to the
> + * execve() system call. MAX_ARG_STRLEN is essentially random but serves to
> + * prevent the kernel from being unduly impacted by misaddressed pointers.
> + * MAX_ARG_STRINGS is chosen to fit in a signed 32-bit integer.
> */
> -#define MAX_ARG_PAGES 32
> +#define MAX_ARG_STRLEN (PAGE_SIZE * 32)
> +#define MAX_ARG_STRINGS 0x7FFFFFFF
This adds a new usage of PAGE_SIZE to an exported header.
How can this be fixed for 2.6.23?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists