From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Olaf Hering <olaf@aepfle.de>,
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>,
Ingo Molnar <mingo@elte.hu>, Andi Kleen <ak@suse.de>
Subject: Re: [patch 3/3] mm: variable length argument support
Date: Tue, 07 Aug 2007 21:26:36 +0200 [thread overview]
Message-ID: <1186514797.11797.173.camel@lappy> (raw)
In-Reply-To: <20070807122008.fcd175d6.akpm@linux-foundation.org>
On Tue, 2007-08-07 at 12:20 -0700, Andrew Morton wrote:
> On Tue, 7 Aug 2007 21:03:57 +0200
> Olaf Hering <olaf@aepfle.de> wrote:
>
> > 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?
>
> Put #ifdef __KERNEL__ around it?
Sounds like a good idea, since its new there should not yet be anybody
using it.
If anything, someone used to use MAX_ARG_PAGES in userspace, which we
just now broke. Olaf said he'd grep a distro source base to find out :-)
next prev parent reply other threads:[~2007-08-07 19:27 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
2007-08-07 19:20 ` Andrew Morton
2007-08-07 19:26 ` Peter Zijlstra [this message]
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=1186514797.11797.173.camel@lappy \
--to=a.p.zijlstra@chello.nl \
--cc=aaw@google.com \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@elte.hu \
--cc=olaf@aepfle.de \
--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).