From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>,
Ollie Wild <aaw@google.com>,
linux-kernel@vger.kernel.org,
parisc-linux@lists.parisc-linux.org,
Arjan van de Ven <arjan@infradead.org>,
linux-mm@kvack.org, Andrew Morton <akpm@osdl.org>,
Andi Kleen <ak@muc.de>,
linux-arch@vger.kernel.org, David Howells <dhowells@redhat.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ulrich Drepper <drepper@redhat.com>
Subject: Re: [patch] remove MAX_ARG_PAGES
Date: Fri, 29 Dec 2006 23:20:31 +0100 [thread overview]
Message-ID: <20061229222031.GA23724@elte.hu> (raw)
In-Reply-To: <Pine.LNX.4.64.0612291322150.4473@woody.osdl.org>
[Cc:-ed Ulrich too]
* Linus Torvalds <torvalds@osdl.org> wrote:
> On Fri, 29 Dec 2006, Russell King wrote:
> >
> > Suggest you test (eg) a rebuild of libX11 to see how it reacts to
> > this patch.
>
> Also: please rebuild "xargs" and install first. Otherwise, a lot of
> build script etc that use "xargs" won't ever trigger the new limits
> (or lack thereof), because xargs will have been installed with some
> old limits.
yeah, and i think the default chunking of xargs should still remain
128K.
If it's fine for a script to get chunked input, and if the script has no
security relevance (xargs is fundamentally unsafe if any portion of the
VFS namespace it gets used is untrusted), then there's no problem for
the xargs limit to stay at 128K.
> Perhaps more worrying is if compiling xargs under a new kernel then
> means that it won't work correctly under an old one.
xargs has its limit hardcoded AFAICS, it's based on:
#define ARG_MAX 131072 /* # bytes of args + environ for exec() */
i'd not change that just yet. The sysconf(3) manpage says it's generally
unreliable:
BUGS
It is difficult to use ARG_MAX because it is not specified how much of
the argument space for exec() is consumed by the user's environment
variables.
but ... as it is with every limit, it is always possible to write an
application that hardcodes a larger limit and then doesnt work when
running with the lower limit. Would that have been a correct argument
against say raising the user stack limit from the historic 1MB?
right now some of my (more stupid) scripts occasionally break if any
random portion of my VFS namespace grows over the silly 128K limit. (and
it rarely has the tendency to shrink, sadly) I think that is just as
much of a legitimate problem as any naive newly written script not
working on an older kernel on a huge VFS namespace. (in fact i could
argue for it to be a more legitimate problem than other stupid scripts
not being backwards compatible, not the least because it is a problem
with /my/ scripts ;-)
we could try something like adding an ARG_MAX rlimit, but i think that
would be overdoing it ... we could also do a sysctl as a global limit -
equally pointless because distros will likely tweak it up anyway, and in
any case neither measure really prevents the writing of stupid scripts.
Ingo
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2006-12-29 22:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-11 0:05 Removing MAX_ARG_PAGES (request for comments/assistance) Ollie Wild
2006-10-11 8:00 ` Arjan van de Ven
2006-10-11 17:13 ` Ollie Wild
2006-10-11 13:14 ` Peter Zijlstra
2006-10-11 21:48 ` Ollie Wild
2006-10-24 17:48 ` Ollie Wild
2006-12-29 20:03 ` [patch] remove MAX_ARG_PAGES Ingo Molnar
2006-12-29 20:49 ` Russell King
2006-12-29 21:23 ` Linus Torvalds
2006-12-29 22:20 ` Ingo Molnar [this message]
2006-12-29 21:57 ` Ingo Molnar
2007-01-01 6:51 ` Ollie Wild
2007-01-01 6:58 ` Ollie Wild
2007-01-01 17:28 ` Pavel Machek
2007-01-02 18:18 ` David Howells
2007-01-02 17:52 ` Removing MAX_ARG_PAGES (request for comments/assistance) David Howells
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=20061229222031.GA23724@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=aaw@google.com \
--cc=ak@muc.de \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=dhowells@redhat.com \
--cc=drepper@redhat.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=parisc-linux@lists.parisc-linux.org \
--cc=rmk+lkml@arm.linux.org.uk \
--cc=torvalds@osdl.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