All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Kolbitsch <clemens.kol@gmx.at>
To: linux-kernel@vger.kernel.org
Subject: Re: Forbid deletion of memory mappings
Date: Thu, 30 Aug 2007 23:41:09 +0200	[thread overview]
Message-ID: <200708302341.09459.clemens.kol@gmx.at> (raw)
In-Reply-To: <Pine.LNX.4.64.0708302333320.2460@twin.jikos.cz>

On Thursday 30 August 2007 23:34:52 you wrote:
> On Thu, 30 Aug 2007, Clemens Kolbitsch wrote:
> > is there no way to tell the kernel, that a certain mapping must not be
> > removed, no matter what (except of course an explicit call to sys_unmap,
> > of course)?
>
> I don't seem to get what is the issue here. Your mapping is not removed,
> only the VMAs are merged together into one larger VMA if they have
> neighbouring address ranges and compatible protection bits. See
> vma_merge().

the thing is that they are not. the kernel chooses to REPLACE my mapping.

consider the user-space code:

mmap(0xaaaa0000, 0x3000, MAP_FIXED, ...);
mmap(0xaaaa1000, 0x4000, MAP_FIXED, ...);

here, the second call to mmap will shorten the first mapping to 0x1000 bytes 
and create one big vma with size 0x5000 bytes.

is there a way to tell it that the second mmap MUST fail?



  reply	other threads:[~2007-08-30 21:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-30 16:44 Forbid deletion of memory mappings Clemens Kolbitsch
2007-08-30 17:07 ` Jiri Kosina
2007-08-30 17:09   ` Clemens Kolbitsch
2007-08-30 21:32   ` Clemens Kolbitsch
2007-08-30 21:34     ` Jiri Kosina
2007-08-30 21:41       ` Clemens Kolbitsch [this message]
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=200708302341.09459.clemens.kol@gmx.at \
    --to=clemens.kol@gmx.at \
    --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 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.