Messages in this thread | | | Date | Fri, 29 Feb 2008 12:03:40 -0800 | From | "Ollie Wild" <> | Subject | Re: [RFC/PATCH] RLIMIT_ARG_MAX |
| |
On Fri, Feb 29, 2008 at 11:50 AM, Linus Torvalds <torvalds@linux-foundation.org> wrote: > > Another thing we could decide to do is to just check the size of the stack > that is left at the end of all the stack setup code, and just say "if it's > less than X bytes, just return ENOMEM rather than set up a process with a > really unusably small stack".
What would be a reasonable value, though? Whereas argument space is static and known at process execution time, required stack space is program dependent. If the program is going to crash, I'd rather it do so at exec time. Otherwise, we end up with corrupted files, partially committed database transactions, and so forth. I'd rather error on the side of small argument space.
In the common situation, a 25% argument allocation is vastly larger than the pre-2.6.23 limit. We're really only talking about cases where the limits have been set to unusually small values. I'd be interested in hearing from people that do this in practice. Why do they do this? What are their expectations?
Ollie
| |