public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
To: "Ted Ts'o" <tytso@mit.edu>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	martin capitanio <m@capitanio.org>,
	linux-kernel@vger.kernel.org, torvalds@linux-foundation.org
Subject: Re: mmap, the language go, problems with the linux kernel
Date: Wed, 16 Feb 2011 21:51:32 +0100	[thread overview]
Message-ID: <87mxlvsnxn.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <20110213012227.GC2598@thunk.org> (Ted Ts'o's message of "Sat, 12 Feb 2011 20:22:27 -0500")

* Ted Ts'o:

>> The odd thing is that prot==0 does *not* count against the
>> vm.overcommit_memory=2 limit, only against ulimit -v.  The limit is
>> only enforced for the parts on which mprotect is called.  I think this
>> should really be part of the public API (I'm not sure if it is right
>> now, it could well be an accident), to avoid the problems you
>> describe.
>
> The overcommit_memory logic does not include any pages which are
> mapped read-only.

A colleague tells me that according to his tests, this depends on the
history of the page, as expected.

> Technically that's not quite enough --- in theory you could have a
> debugging attach to every single read-only text page and set
> breakpoints on every single page.

Those cases do not matter because setting a breakpoint can fail with
ENOMEM.  You only have to take into account possibly future operations
which cannot fail with ENOMEM.

  reply	other threads:[~2011-02-16 20:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-08 12:37 mmap, the language go, problems with the linux kernel martin capitanio
2011-02-08 13:26 ` Alan Cox
2011-02-12 14:28   ` Florian Weimer
2011-02-13  1:22     ` Ted Ts'o
2011-02-16 20:51       ` Florian Weimer [this message]
2011-02-08 16:23 ` Linus Torvalds
2011-02-09 16:30   ` Martin Capitanio
2011-02-09 16:40     ` Russ Cox
2011-02-09 19:17     ` Ted Ts'o
2011-02-09 19:56       ` [golang-dev] " Ian Lance Taylor
2011-02-09 20:11         ` Ted Ts'o
2011-02-16 18:16       ` Hannes Frederic Sowa

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=87mxlvsnxn.fsf@mid.deneb.enyo.de \
    --to=fw@deneb.enyo.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m@capitanio.org \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox