[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47C84C6C.2000201@gmail.com>
Date: Fri, 29 Feb 2008 19:18:20 +0100
From: Michael Kerrisk <michael.kerrisk@...glemail.com>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
CC: Linus Torvalds <torvalds@...ux-foundation.org>,
Michael Kerrisk <michael.kerrisk@...glemail.com>,
aaw <aaw@...gle.com>, Andrew Morton <akpm@...ux-foundation.org>,
carlos@...esourcery.com, Alan Cox <alan@...rguk.ukuu.org.uk>,
linux-kernel <linux-kernel@...r.kernel.org>, drepper@...hat.com,
mtk.manpages@...il.com, Geoff Clare <gwc@...ngroup.org>
Subject: Re: [RFC/PATCH] RLIMIT_ARG_MAX
Peter Zijlstra wrote:
> On Fri, 2008-02-29 at 09:35 -0800, Linus Torvalds wrote:
>> On Fri, 29 Feb 2008, Peter Zijlstra wrote:
>>> You fail to mention that <23 will still fault the first time it tries to
>>> grow the stack when you set rlimit_stack to 128k and actually supply
>>> 128k of env+arg.
>> So? That's what rlimit_stack has always meant (and not just on Linux
>> either, afaik). That's not a bug, it's a feature. If the system has a
>> limited stack, it has a limited stack. That's what RLIMIT_STACK means.
>
> Well, I agree with that point. It just that apparently POSIX does not.
> According to Michael POSIX does not consider the arg+env array part of
> the stack proper.
AFAIK, POSIX.1 makes no requirement here. Most (all?) Unix systems have
traditionally placed argv+environ just above the stack, but that isn't
required.
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists