AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:
CFG:
PT:0
S:andy.sharp@lsi.com
RQ:
SSV:mhbs.lsil.com
NSV:
SSH:
R:<Maxim.Kozlovsky@lsi.com>
MAID:2
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/LSI/INBOX	0	861DA0537719934884B3D30A2666FECC010E2CCF65@cosmail02.lsi.com
X-Sylpheed-End-Special-Headers: 1
Date: Wed, 10 Mar 2010 16:14:47 -0800
From: Andrew Sharp <andy.sharp@lsi.com>
To: "Kozlovsky, Maxim" <Maxim.Kozlovsky@lsi.com>
Subject: Re: Please review 34835
Message-ID: <20100310161447.0fe26114@ripper.onstor.net>
In-Reply-To: <861DA0537719934884B3D30A2666FECC010E2CCF65@cosmail02.lsi.com>
References: <861DA0537719934884B3D30A2666FECC010E2CCF23@cosmail02.lsi.com>
	<20100310153244.2536c30c@ripper.onstor.net>
	<861DA0537719934884B3D30A2666FECC010E2CCF65@cosmail02.lsi.com>
Organization: LSI
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Wed, 10 Mar 2010 16:37:55 -0700 "Kozlovsky, Maxim"
<Maxim.Kozlovsky@lsi.com> wrote:

> 
> 
> -----Original Message-----
> From: Kozlovsky, Maxim 
> Sent: Wednesday, March 10, 2010 3:37 PM
> To: Sharp, Andy
> Subject: RE: Please review 34835
> 
> 
> nfx-tree/code/sm-utils/sys-utils-api.h
> 
>      stack limit might be a bit small?  i guess some testing needs to
>      accompany these changes to see what breaks.
> [MK] This was the stack limit all along. I can't imagine any normal
> piece of software that needs stack this deep.

ok

> nfx-tree/code/sm-utils/sys-utils-linux.c
> 
>      line 112, 117 the way I read the linux man page, and the code,
>      rl.rlim_cur and rlim_max should be set to the same value.
> [MK] No, rlim_max is the hard limit for the children, they will not
> be able to modify rlim_cur past rlim_max if rlim_max is set to
> something less than RLIM_INFINITY.
> 
> [MK] Here is the man page exerpt:
>       The soft limit is the value that the kernel enforces  for  the
> corre- sponding  resource.   The  hard  limit  acts as a ceiling for
> the soft limit: an unprivileged process may only set its soft limit
> to a  value in the range from 0 up to the hard limit, and
> (irreversibly) lower its hard  limit.

Yeah, I got the man page.  So a process can change it's limit to
infinity [and beyond] at any time -- who knows what library routines, or
existing daemons like samba, might do -- and children start at infinity
rather than our limit. Is that the right thing to do?  Perhaps
rlimit_max should be queried and preserved?  If you're happy with it
the way it is, go for it.  I'm just playing devil's advocate.


