On Fri, Jan 08, 2010 at 08:53:52PM +0000, Eduardo Horvath wrote:
> > I think the rlimit part is still wrong. rlim_cur is a int, so storing a
> > 64bit value, possibly larger than 4Gb in a 32bit int will cause trouble.
> > In this case the overflow needs to be detected and a sensible value
> > needs to be used instead. Otherwise, you may end up with a very low RSS
> > limit preventing userland from running.
> 
> Uh... No, rlimits are rlim_t which are uint64_t.

I stand corrected, thanks

>  But you are correct that 
> this might cause trouble if we ever bothered to check it.  
> 
> I think you should cap the RSS limit ar VM_MAXUSER_ADDRESS in case someone 
> ever enhances UVM to track RSS.  There is little point in having more 
> pages resident than you are allowed to address.

Seconded

-- 
Manuel Bouyer <[email protected]>
     NetBSD: 26 ans d'experience feront toujours la difference
--

Reply via email to