linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Kerrisk" <michael.kerrisk@googlemail.com>
To: "Linus Torvalds" <torvalds@linux-foundation.org>
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 20:49:16 +0100	[thread overview]
Message-ID: <c49095e30802291149t7ad01f6bl59b9083bfb41c920@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.1.00.0802291032370.17889@woody.linux-foundation.org>

On Fri, Feb 29, 2008 at 7:39 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
>
>  On Fri, 29 Feb 2008, Michael Kerrisk wrote:
>  >
>  > My reading of POSIX.1 (and POSIX doesn't seem very explicit on this point), is
>  > that the limits on argv+environ and on stack are decoupled, since POSIX
>  > specifies RLIMIT_STACK and sysconf(_SC_ARG_MAX) and doesn't specify any
>  > relationship between the two.
>
>  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?

>  Usually, _SC_ARG_MAX is just so much smaller than RLIMIT_STACK that it
>  makes no possible difference.  Which I would actually argue we should just
>  continue with: just keep _SC_ARG_MAX a smallish, irrelevant constant.
>
>  We still have to have the compile-time ARG_MAX constant (as in *real*
>  constant - a #define) anyway, for traditional programs, and you might as
>  well make sysconf(_SC_ARG_MAX) always just match ARG_MAX.
>
>  It's not like there is likely a single user of _SC_ARG_MAX that cares.

In my initial reply, I pointed out one example where users *may* care:
NPTL uses RLIMIT_STACK to determine the size of per-thread stacks.  It
is conceivable that users might want to set RLIMIT_STACK < 512k, and
that would have the effect of lowering the amount of space for
argv+eviron below what the kernel has historically guaranteed.  That's
an ABI change, though it's unclear whether it would impact anyone in
practice.

  reply	other threads:[~2008-02-29 19:49 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 [this message]
2008-02-29 20:07                 ` Linus Torvalds
2008-02-29 20:43                   ` Michael Kerrisk
2008-02-29 21:34                     ` Linus Torvalds
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=c49095e30802291149t7ad01f6bl59b9083bfb41c920@mail.gmail.com \
    --to=michael.kerrisk@googlemail.com \
    --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=mtk.manpages@gmail.com \
    --cc=torvalds@linux-foundation.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).