linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: linux-kernel@vger.kernel.org,
	parisc-linux@lists.parisc-linux.org, linux-mm@kvack.org,
	linux-arch@vger.kernel.org, Ollie Wild <aaw@google.com>,
	Andrew Morton <akpm@osdl.org>, Ingo Molnar <mingo@elte.hu>,
	Andi Kleen <ak@suse.de>
Subject: Re: [patch 3/3] mm: variable length argument support
Date: Tue, 7 Aug 2007 21:03:57 +0200	[thread overview]
Message-ID: <20070807190357.GA31139@aepfle.de> (raw)
In-Reply-To: <20070613100835.014096712@chello.nl>

On Wed, Jun 13, Peter Zijlstra wrote:

> From: Ollie Wild <aaw@google.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?

  reply	other threads:[~2007-08-07 19:03 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-13 10:03 [patch 0/3] no MAX_ARG_PAGES -v2 Peter Zijlstra
2007-06-13 10:03 ` [patch 1/3] arch: personality independent stack top Peter Zijlstra
2007-06-13 10:03 ` [patch 2/3] audit: rework execve audit Peter Zijlstra
2007-06-26 22:55   ` Andrew Morton
2007-07-03 15:00     ` Peter Zijlstra
2007-06-13 10:03 ` [patch 3/3] mm: variable length argument support Peter Zijlstra
2007-08-07 19:03   ` Olaf Hering [this message]
2007-08-07 19:20     ` Andrew Morton
2007-08-07 19:26       ` Peter Zijlstra
2007-08-07 20:10       ` Olaf Hering
2007-08-22  8:48   ` Dan Aloni
2007-08-22  8:54     ` Peter Zijlstra
2007-08-22  9:05       ` Andrew Morton
     [not found]     ` <20070822090251.GA7038@mail.ustc.edu.cn>
2007-08-22  9:02       ` Fengguang Wu
2007-06-13 23:36 ` [patch 0/3] no MAX_ARG_PAGES -v2 Luck, Tony
2007-06-14  6:23   ` Ollie Wild
2007-06-14  8:38     ` Peter Zijlstra
2007-06-14 18:22       ` Luck, Tony
2007-06-14 18:32         ` Peter Zijlstra
2007-06-14 20:58       ` Ollie Wild
2007-06-14 21:18         ` Peter Zijlstra
2007-06-15  9:24         ` Peter Zijlstra
2007-06-15 18:07           ` Ollie Wild
2007-06-15 18:49             ` Luck, Tony
2007-06-17 18:32 ` Pavel Machek
2007-06-17 19:07   ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070807190357.GA31139@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=a.p.zijlstra@chello.nl \
    --cc=aaw@google.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@elte.hu \
    --cc=parisc-linux@lists.parisc-linux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).