All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: "Jörn Engel" <joern@logfs.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH, RFC] mm: Implement RLIMIT_RSS
Date: Thu, 13 Jun 2013 17:57:32 +0900	[thread overview]
Message-ID: <20130613085732.GB4533@bbox> (raw)
In-Reply-To: <20130611215319.GA29368@logfs.org>

Hey Jorn,

On Tue, Jun 11, 2013 at 05:53:20PM -0400, Jorn Engel wrote:
> On Tue, 11 June 2013 17:16:01 -0400, Johannes Weiner wrote:
> > On Tue, Jun 11, 2013 at 02:29:21PM -0400, Jorn 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?
> > 
> > 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.
> 
> Hm.  The use case I have is that an application wants to limit itself.
> It is effectively a special assert to catch memory leaks and the like.
> So malicious programs are not my immediate concern.

Just out of curisoity.

It means you already know the max rss of the application in advance
so you can use taskstats's hiwater_rss if you don't need to catch
the moment which rss is over the limit.

-- 
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Minchan Kim <minchan@kernel.org>
To: "Jörn Engel" <joern@logfs.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH, RFC] mm: Implement RLIMIT_RSS
Date: Thu, 13 Jun 2013 17:57:32 +0900	[thread overview]
Message-ID: <20130613085732.GB4533@bbox> (raw)
In-Reply-To: <20130611215319.GA29368@logfs.org>

Hey Jörn,

On Tue, Jun 11, 2013 at 05:53:20PM -0400, Jörn Engel wrote:
> On Tue, 11 June 2013 17:16:01 -0400, Johannes Weiner wrote:
> > 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?
> > 
> > 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.
> 
> Hm.  The use case I have is that an application wants to limit itself.
> It is effectively a special assert to catch memory leaks and the like.
> So malicious programs are not my immediate concern.

Just out of curisoity.

It means you already know the max rss of the application in advance
so you can use taskstats's hiwater_rss if you don't need to catch
the moment which rss is over the limit.

-- 
Kind regards,
Minchan Kim

  reply	other threads:[~2013-06-13  8:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-11 18:29 [PATCH, RFC] mm: Implement RLIMIT_RSS Jörn Engel
2013-06-11 18:29 ` Jörn Engel
2013-06-11 21:16 ` Johannes Weiner
2013-06-11 21:16   ` Johannes Weiner
2013-06-11 21:53   ` Jörn Engel
2013-06-11 21:53     ` Jörn Engel
2013-06-13  8:57     ` Minchan Kim [this message]
2013-06-13  8:57       ` Minchan Kim
2013-06-13 14:43       ` Jörn Engel
2013-06-13 14:43         ` Jörn Engel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130613085732.GB4533@bbox \
    --to=minchan@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=joern@logfs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.