All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: David Howells <dhowells@redhat.com>,
	akpm@osdl.org, dalomar@serrasold.com,
	linux-kernel@vger.kernel.org, uclinux-dev@uclinux.org
Subject: Re: [PATCH 1/3] NOMMU: Provide shared-writable mmap support on ramfs
Date: Wed, 23 Nov 2005 19:23:29 +0000	[thread overview]
Message-ID: <376.1132773809@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0511231109040.13959@g5.osdl.org>

Linus Torvalds <torvalds@osdl.org> wrote:

> >  (3) Not permitting a file to be shrunk if it would truncate any shared
> >      mappings (private mappings are copied).
> 
> Why?
> 
> Truncate is _supposed_ to get rid of any shared mmap stuff. 

Yeah... but under _NOMMU_ conditions, it can't. There's no MMU around to
enforce the fact that the mapping has been shrunk.

Imagine two processes: one creates a shmem file and makes it a certain size;
both processes mmap it; then one of the processes attempts to shrink it. The
process that shrank it knows it has been shortened and that the memory has
been release, but the second process may not. Splat.

David

  reply	other threads:[~2005-11-23 19:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-23 18:59 [PATCH 1/3] NOMMU: Provide shared-writable mmap support on ramfs David Howells
2005-11-23 18:59 ` [PATCH 2/3] NOMMU: Make SYSV IPC SHM use ramfs facilities on NOMMU David Howells
2005-11-23 18:59 ` [PATCH 3/3] FRV: Implement futex operations for FRV David Howells
2005-11-23 19:09 ` [PATCH 1/3] NOMMU: Provide shared-writable mmap support on ramfs Linus Torvalds
2005-11-23 19:23   ` David Howells [this message]
2005-11-23 19:25     ` David Howells

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=376.1132773809@warthog.cambridge.redhat.com \
    --to=dhowells@redhat.com \
    --cc=akpm@osdl.org \
    --cc=dalomar@serrasold.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=uclinux-dev@uclinux.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.