lkml.org 
[lkml]   [2008]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2008-02-29 21:07    [W:0.216 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site