lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 29 Feb 2008 21:43:45 +0100
From:	"Michael Kerrisk" <michael.kerrisk@...glemail.com>
To:	"Linus Torvalds" <torvalds@...ux-foundation.org>
Cc:	"Peter Zijlstra" <a.p.zijlstra@...llo.nl>, 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

On Fri, Feb 29, 2008 at 9:07 PM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
>
>  On Fri, 29 Feb 2008, Michael Kerrisk wrote:
>
>  > On Fri, Feb 29, 2008 at 7:39 PM, Linus Torvalds
>  > <torvalds@...ux-foundation.org> wrote:
>  >
>
> > >  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?

>  The fact is, we *also* know for sure that anybody that depends on
>  _SC_ARG_MAX being exact has always - and will continue to be - broken.
>  Again, because of not only older kernels but also because even with the
>  patch in question, we don't count argument sizes exactly.
>
>
>  > 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.
>
>  I do agree that we should at least make the "MAX(stacksize/4, 128k)"
>  change for backwards compatibility.

Good -- because that's probably the most important point, IMO.

> That is actually a potential
>  regression, but it has nothing to do with a new _SC_ARG_SIZE, because
>  quite frankly, it's a regression *regardless* of whether we'd expose a new
>  rlimit or not!

Agreed.

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.

Cheers,

Michael
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ