linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Michael Kerrisk <michael.kerrisk@googlemail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>, aaw <aaw@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	carlos@codesourcery.com, Alan Cox <alan@lxorguk.ukuu.org.uk>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	drepper@redhat.com, mtk.manpages@gmail.com,
	Geoff Clare <gwc@opengroup.org>
Subject: Re: [RFC/PATCH] RLIMIT_ARG_MAX
Date: Fri, 29 Feb 2008 13:34:21 -0800 (PST)	[thread overview]
Message-ID: <alpine.LFD.1.00.0802291316000.17889@woody.linux-foundation.org> (raw)
In-Reply-To: <c49095e30802291243x6087399w4b98ae251f57319b@mail.gmail.com>



On Fri, 29 Feb 2008, Michael Kerrisk wrote:

> On Fri, Feb 29, 2008 at 9:07 PM, Linus Torvalds
> >
> > > >  I agree. And clearly there _are_ relationships and always have been, but
> >  > >  equally clearly they simply haven't been a big issue in practice, and
> >  > >  nobody really cares.
> >  >
> >  > Do we know that for sure?
> >
> >  We *do* know for sure that the relationship has always been there. At
> >  least in Linux, and I bet in 99% of all other Unixes too. The arguments
> >  simply have traditionally been counted as part of the stack size.
> >
> >  Or did you mean the latter part?
> 
> I meant: do we know for sure that no one really cares?

Well, what I have tried to argue is that even if they care, the patch 
won't actually really help. It just moves existing behaviour around a bit, 
but leaves all the fundamental issues totally untouched in that it may 
count the strings, but not the pointers themselves etc.

More importantly, anybody who would depend on any new behaviour would 
still be screwed on all other platforms - including older Linux ones - in 
that they'd depend on some very specific behaviour that simply isn't going 
to be there in other cases.

So yeah, I can see that people could care, but they *shouldn't*.

> The new rlimit is primarily for the (supposed) applications that care
> about knowing (at least approximately) what _SC_ARG_MAX is.  I raised
> the initial bug report against glibc because applications can no
> longer (post 2.6.23) do this, but I haven't done the investigation
> about how many applications actually care.

Very few reasonably can. The thing is, in order to care, you have to count 
things like your own environment space etc, and you have to know that 
there is something you can even *do* about it if the counts go wrong.

So in practice, I think it's just about things like "xargs" and very few 
actual applications. 

I did try to do a google codesearch on "sysconf(_SC_ARG_MAX)" and it 
exists, but there wasn't a whole lot. The most logical one (and the one 
that didn't prefer the ARG_MAX #define) was the built-in xargs in ksh.

But I really didn't look very hard, just a few screenfuls of codesearch.

Realistically, "xargs" really is the main user. *Most* users of execve() 
simply either want all their arguments or none. It's not that common that 
somebody says "ok, I have a ton of arguments, but if you limit them I'll 
just use a fraction of them".

			Linus

  reply	other threads:[~2008-02-29 21:36 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-27 13:37 [RFC/PATCH] RLIMIT_ARG_MAX Peter Zijlstra
2008-02-29 16:05 ` Linus Torvalds
2008-02-29 16:58   ` Michael Kerrisk
2008-02-29 17:12     ` Linus Torvalds
2008-02-29 17:18       ` Peter Zijlstra
2008-02-29 17:29         ` Linus Torvalds
2008-02-29 17:42           ` Peter Zijlstra
2008-02-29 18:12             ` Linus Torvalds
2008-02-29 19:01               ` Ollie Wild
2008-02-29 19:09                 ` Jakub Jelinek
2008-02-29 19:50                   ` Linus Torvalds
2008-02-29 20:03                     ` Ollie Wild
2008-03-04 20:07           ` Pavel Machek
2008-02-29 17:14     ` Peter Zijlstra
2008-02-29 17:35       ` Linus Torvalds
2008-02-29 17:55         ` Peter Zijlstra
2008-02-29 18:14           ` Linus Torvalds
2008-02-29 18:18           ` Michael Kerrisk
2008-02-29 18:39             ` Linus Torvalds
2008-02-29 19:49               ` Michael Kerrisk
2008-02-29 20:07                 ` Linus Torvalds
2008-02-29 20:43                   ` Michael Kerrisk
2008-02-29 21:34                     ` Linus Torvalds [this message]
2008-02-29 21:57                   ` Linus Torvalds
2008-03-01 14:21                     ` Carlos O'Donell
2008-03-01  8:42             ` Geoff Clare
2008-02-29 18:40           ` Alan Cox

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=alpine.LFD.1.00.0802291316000.17889@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=aaw@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=carlos@codesourcery.com \
    --cc=drepper@redhat.com \
    --cc=gwc@opengroup.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.kerrisk@googlemail.com \
    --cc=mtk.manpages@gmail.com \
    /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).