From: Clemens Kolbitsch <clemens.kol@gmx.at>
To: Jiri Kosina <jikos@jikos.cz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Forbid deletion of memory mappings
Date: Thu, 30 Aug 2007 19:09:28 +0200 [thread overview]
Message-ID: <200708301909.28894.clemens.kol@gmx.at> (raw)
In-Reply-To: <Pine.LNX.4.64.0708301906020.2460@twin.jikos.cz>
On Thursday 30 August 2007 19:07:05 Jiri Kosina wrote:
> On Thu, 30 Aug 2007, Clemens Kolbitsch wrote:
> > It all works perfectly well (creating & deleting the additional
> > mappings), however, when the kernel feels like it needs to allocate a
> > mapping in user-space it sometimes deletes my mapping and overwrites it
> > with the new one, although there is plenty of free memory at some other
> > location.
>
> Hi Clemens,
>
> what do you mean by "overwrites it"? It just probably merges your vma with
> the newly created one, right?
that's exactly the problem... it replaces my mapping with the new one... i.e.
it first deletes my mapping and then creates the new one at the same
location.
i *guess* this all happens in exec.c, lines 1033ff:
munmap_back:
vma = find_vma_prepare(mm, addr, &prev, &rb_link, &rb_parent);
if (vma && vma->vm_start < addr + len) {
if (do_munmap(mm, addr, len))
return -ENOMEM;
goto munmap_back;
}
next prev parent reply other threads:[~2007-08-30 17:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-30 16:44 Clemens Kolbitsch
2007-08-30 17:07 ` Jiri Kosina
2007-08-30 17:09 ` Clemens Kolbitsch [this message]
2007-08-30 21:32 ` Clemens Kolbitsch
2007-08-30 21:34 ` Jiri Kosina
2007-08-30 21:41 ` Clemens Kolbitsch
2007-08-30 21:50 ` Valdis.Kletnieks
2007-08-30 22:05 ` Clemens Kolbitsch
2007-09-04 10:17 ` Helge Hafting
2007-09-04 10:29 ` Clemens Kolbitsch
2007-09-04 14:53 ` linux-os (Dick Johnson)
2007-08-30 21:55 ` Jiri Kosina
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=200708301909.28894.clemens.kol@gmx.at \
--to=clemens.kol@gmx.at \
--cc=jikos@jikos.cz \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®