Re: [RFC/PATCH] RLIMIT_ARG_MAX

From: Ollie Wild
Date: Fri Feb 29 2008 - 15:04:03 EST


On Fri, Feb 29, 2008 at 11:50 AM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/