All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: "David S. Miller" <davem@redhat.com>
Cc: hugh@veritas.com, willy@debian.org,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	PARISC list <parisc-linux@lists.parisc-linux.org>,
	drepper@redhat.com
Subject: Re: [parisc-linux] Re: Problems with kernel mmap (failing tst-mmap-eofsync in glibc on parisc)
Date: 22 Aug 2003 17:27:33 -0500	[thread overview]
Message-ID: <1061591255.1784.636.camel@mulgrave> (raw)
In-Reply-To: <20030822121955.619a14eb.davem@redhat.com>

On Fri, 2003-08-22 at 14:19, David S. Miller wrote:
> Sparc64's alias'able caches are 1) write-through and 2) quite small.
> 
> I think I begin to see the issue clearly now.
> 
> But you cannot do the VM_SHARED change without an audit first.
> Lots of code thinks that VM_SHARED means someone maybe wrote
> to the page through a mmap().  For example look at how filemap
> sync interprets this flag bit.

Yes, the issue seems to be that the flush_dcache_page() was implemented
with the thought that the caches of the shared mappings may contain
modified data that needs to be flushed to the aliased page.

The opposite property: that the caches of the aliased page need to be
invalidated because someone else changed data in the aliased page seems
to work as a byproduct of the above implementation.

But some of the checks for !list_empty(&mapping->i_shared) are going to
prevent the necessary invalidations on read only shared mappings...which
was the initial problem.

The only issue I can see with not dropping VM_SHARED for read only
shared mappings is that we do spurious (but harmless)
flushe_dcache_page() on reads.

There also appears to be a lurking prob lem in do_mremap, where it keys
off the VM_SHARED flag to set the MAP_SHARED flag for
get_unmapped_area.  That's going to cause us a problem on parisc because
SHARED pages need to obey slightly stricter alignment constraints

All in all, I think not dropping VM_SHARED on read only shared mappings
is the right thing to do.

Do you need a more detailed audit?

James

  parent reply	other threads:[~2003-08-22 22:27 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-22 14:40 [parisc-linux] Problems with kernel mmap (failing tst-mmap-eofsync in glibc on parisc) James Bottomley
2003-08-22 14:40 ` James Bottomley
2003-08-22 16:14 ` [parisc-linux] " David S. Miller
2003-08-22 16:14 ` David S. Miller
2003-08-22 16:14   ` David S. Miller
2003-08-22 16:34   ` [parisc-linux] " Matthew Wilcox
2003-08-22 16:34   ` Matthew Wilcox
2003-08-22 16:39     ` David S. Miller
2003-08-22 16:39     ` David S. Miller
2003-08-22 17:41       ` Matthew Wilcox
2003-08-22 17:41       ` Matthew Wilcox
2003-08-22 17:36         ` David S. Miller
2003-08-22 18:01           ` David S. Miller
2003-08-22 18:01           ` David S. Miller
2003-08-22 18:34             ` Hugh Dickins
2003-08-22 18:34             ` Hugh Dickins
2003-08-22 18:31               ` David S. Miller
2003-08-22 18:56                 ` James Bottomley
2003-08-22 19:19                   ` David S. Miller
2003-08-22 22:27                     ` James Bottomley
2003-08-22 22:27                     ` James Bottomley [this message]
2003-08-22 22:41                       ` David S. Miller
2003-08-23  1:09                         ` James Bottomley
2003-08-23  7:22                           ` Hugh Dickins
2003-08-23 15:59                             ` James Bottomley
2003-08-23 15:59                             ` James Bottomley
2003-08-23 21:44                             ` David S. Miller
2003-08-23 21:44                             ` David S. Miller
2003-08-23  7:22                           ` Hugh Dickins
2003-08-23 21:43                           ` David S. Miller
2003-08-23 22:21                             ` James Bottomley
2003-08-23 22:21                             ` James Bottomley
2003-08-23 22:51                               ` David S. Miller
2003-08-23 23:01                                 ` James Bottomley
2003-08-23 23:01                                 ` James Bottomley
2003-08-23 22:51                               ` David S. Miller
2003-08-23 22:53                               ` David S. Miller
2003-08-23 23:11                                 ` James Bottomley
2003-08-24  0:22                                   ` David S. Miller
2003-08-24  0:22                                   ` David S. Miller
2003-08-24  5:17                                     ` James Bottomley
2003-08-24  5:23                                       ` David S. Miller
2003-08-24 16:54                                         ` James Bottomley
2003-08-24 16:54                                         ` James Bottomley
2003-08-23 23:11                                 ` James Bottomley
2003-08-23 22:53                               ` David S. Miller
2003-08-23 21:43                           ` David S. Miller
2003-08-23  1:09                         ` James Bottomley
2003-08-22 22:41                       ` David S. Miller
2003-08-22 19:19                   ` David S. Miller
2003-08-22 18:56                 ` James Bottomley
2003-08-22 18:31               ` David S. Miller
2003-08-22 18:41               ` James Bottomley
2003-08-22 18:41               ` James Bottomley
2003-08-22 19:02                 ` Hugh Dickins
2003-08-22 19:02                 ` Hugh Dickins
2003-08-22 19:09                 ` Randolph Chung
2003-08-22 19:09                 ` Randolph Chung
2003-08-22 17:36         ` David S. Miller
2003-08-22 16:42     ` Russell King
2003-08-22 16:39       ` David S. Miller
2003-08-22 16:39       ` David S. Miller
2003-08-22 16:42     ` Russell King

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=1061591255.1784.636.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=davem@redhat.com \
    --cc=drepper@redhat.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=parisc-linux@lists.parisc-linux.org \
    --cc=willy@debian.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.