From: Paolo Bonzini <paolo.bonzini@lu.unisi.ch>
To: Hugh Dickins <hugh@veritas.com>
Cc: bonzini@gnu.org, Andrew Morton <akpm@linux-foundation.org>,
bugme-daemon@bugzilla.kernel.org, linux-mm@kvack.org
Subject: Re: [Bug 9138] New: kernel overwrites MAP_PRIVATE mmap
Date: Wed, 10 Oct 2007 06:42:12 +0200 [thread overview]
Message-ID: <470C5824.7030100@lu.unisi.ch> (raw)
In-Reply-To: <Pine.LNX.4.64.0710091711450.30785@blonde.wat.veritas.com>
> It is standard behaviour that truncating the inode on which an mmap
> was done will generate SIGBUS on access to pages of the mmap beyond
> the new end of file. Easier to understand when MAP_SHARED, but even
> when MAP_PRIVATE, and even when private pages have already been
> C-O-Wed from the file.
I would have expected MAP_PRIVATE to establish a snapshot of the file,
as it appears to do on BSDs. I find it hard to believe that code in the
wild wants this behavior for MAP_PRIVATE (on the other hand, it is
clearly the right thing for MAP_SHARED).
> Might it have been a different version of Smalltalk which was tested
> with the 2.6.8 kernel, a version which didn't cause this to happen?
Two weeks ago it started failing on x86-64 after a kernel update but
still worked on i686; then, yesterday it also started failing on i686
(guess what, after another kernel update). It might well be that the
bug was latent in 2.6.8 and was uncovered by another mmap-related change
in the kernel, or something like that.
I can work around it by unlink+open; though it will break hard links,
that's not a big deal.
Thanks for the explanation.
Paolo
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-10-10 4:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-9138-27@http.bugzilla.kernel.org/>
2007-10-09 15:39 ` [Bug 9138] New: kernel overwrites MAP_PRIVATE mmap Andrew Morton
2007-10-09 16:00 ` Paolo Bonzini
2007-10-09 16:25 ` Hugh Dickins
2007-10-10 4:42 ` Paolo Bonzini [this message]
2007-10-09 16:56 ` Paolo Bonzini
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=470C5824.7030100@lu.unisi.ch \
--to=paolo.bonzini@lu.unisi.ch \
--cc=akpm@linux-foundation.org \
--cc=bonzini@gnu.org \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=hugh@veritas.com \
--cc=linux-mm@kvack.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.