lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 11 Jun 2013 17:16:01 -0400
From:	Johannes Weiner <hannes@...xchg.org>
To:	Jörn Engel <joern@...fs.org>
Cc:	linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH, RFC] mm: Implement RLIMIT_RSS

On Tue, Jun 11, 2013 at 02:29:21PM -0400, Jörn Engel wrote:
> I've seen a couple of instances where people try to impose a vsize
> limit simply because there is no rss limit in Linux.  The vsize limit
> is a horrible approximation and even this patch seems to be an
> improvement.
> 
> Would there be strong opposition to actually supporting RLIMIT_RSS?
> 
> Jörn
> 
> --
> It's not whether you win or lose, it's how you place the blame.
> -- unknown
> 
> 
> Not quite perfect, but close enough for many purposes.  This checks rss
> limit inside may_expand_vm() and will fail if we are already over the
> limit.

This is trivial to exploit by creating the mappings first and
populating them later, so while it may cover some use cases, it does
not have the protection against malicious programs aspect that all the
other rlimits have.

The right place to enforce the limit is at the point of memory
allocation, which raises the question what to do when the limit is
exceeded in a page fault.  Reclaim from the process's memory?  Kill
it?

I guess the answer to these questions is "memory cgroups", so that's
why there is no real motivation to implement RLIMIT_RSS separately...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ