Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1291292

Re: [RFC 1/2] [RFC] mm: Account anon mappings as RLIMIT_DATA

From Cyrill Gorcunov <gorcunov@gmail.com>
Newsgroups linux.kernel
Subject Re: [RFC 1/2] [RFC] mm: Account anon mappings as RLIMIT_DATA
Date 2015-12-14 16:50 +0100
Message-ID <qFDxU-83l-13@gated-at.bofh.it> (permalink)
References <qFlhE-4AO-11@gated-at.bofh.it> <qFCLv-7vq-1@gated-at.bofh.it> <qFD4S-7Rv-5@gated-at.bofh.it> <qFDoe-7ZC-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Dec 14, 2015 at 04:32:34PM +0100, Quentin Casasnovas wrote:
> > 
> > growsup/down stand for stack usage iirc, so it was intentionally
> > not accounted here.
> >
> 
> Right, but in the same vein of Linus saying RLIMIT_DATA is/was useless
> because everyone could use mmap() instead of brk() to get anonymous memory,
> what's the point of restricting "almost-all" anonymous memory if one can
> just use MAP_GROWSDOWN/UP and cause repeated page faults to extend that
> mapping, circumventing your checks?  That makes the new restriction as
> useless as what RLIMIT_DATA used to be, doesn't it?

Not as it were before, but true, using growsdown/up will give a way
to allocate memory not limited byt rlimit-data. (Also I just noted
that I modified mm.h as well, where anon_accountable_mapping
was implemented but forgot to add it into quilt, so this patch
on its own won't compile, don't apply it).

> > > 
> > > I only had a quick look so apologies if this is handled and I missed it :)
> > 
> > thanks for feedback! also take a look on Kostya's patch, I think it's
> > even better approach (and I like it more than mine).
> 
> Ha I'm not subscribed to LKML so I missed those, I suppose you can ignore
> my comments then! :)

https://lkml.org/lkml/2015/12/14/72

Take a look.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC 1/2] [RFC] mm: Account anon mappings as RLIMIT_DATA Cyrill Gorcunov <gorcunov@gmail.com> - 2015-12-13 21:20 +0100
  Re: [RFC 1/2] [RFC] mm: Account anon mappings as RLIMIT_DATA Konstantin Khlebnikov <koct9i@gmail.com> - 2015-12-14 09:20 +0100
    [PATCH RFC] mm: rework virtual memory accounting Konstantin Khlebnikov <koct9i@gmail.com> - 2015-12-14 09:20 +0100
      Re: [PATCH RFC] mm: rework virtual memory accounting Cyrill Gorcunov <gorcunov@gmail.com> - 2015-12-14 10:10 +0100
  Re: [RFC 1/2] [RFC] mm: Account anon mappings as RLIMIT_DATA Quentin Casasnovas <quentin.casasnovas@oracle.com> - 2015-12-14 16:00 +0100
    Re: [RFC 1/2] [RFC] mm: Account anon mappings as RLIMIT_DATA Cyrill Gorcunov <gorcunov@gmail.com> - 2015-12-14 16:20 +0100
      Re: [RFC 1/2] [RFC] mm: Account anon mappings as RLIMIT_DATA Quentin Casasnovas <quentin.casasnovas@oracle.com> - 2015-12-14 16:40 +0100
        Re: [RFC 1/2] [RFC] mm: Account anon mappings as RLIMIT_DATA Cyrill Gorcunov <gorcunov@gmail.com> - 2015-12-14 16:50 +0100

csiph-web