This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/2] Set default stack size from program environment


On 2 March 2013 02:32, Roland McGrath <roland@hack.frob.com> wrote:
> It's worse in some regards and better in others.  Anything overly
> coarse-grained like system-wide configuration when it can be local
> per-user or per-process/inherited configuration is worse for the
> issues of user choice and flexibility.  Conversely, anything only
> changeable by privileged administrator action rather than inherited
> from something casually fungible like the environment is better for
> the issue of security hardening.

How about something like this:

1. A /etc/pthreads.conf with hard limits for stack sizes.  Its absence
means that RLIMIT_STACK is in play
2. A per-user .pthreads.conf with user-level overrides for stack sizes
(default_stack_size=1024K) and/or program-level overrides
(default_stack_size=/usr/bin/foo:2M)
3. An environment variable for process-level overrides.

That way we include stuff that everyone hates; the magic environment
variable that you hate and the configuration files that Carlos hates
and of course, slower start-up time which I'm sure *everyone* will
hate ;)  However, it would IMO do a better job of providing
administrative-level adjustment of stack sizes that I attempted
before.

-- 
http://siddhesh.in


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]