Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: linux-mips@linux-mips.org
Subject: Re: [MIPS] Fix aliasing bug in copy_user_highpage, take 2.
Date: Tue, 16 Oct 2007 17:16:18 +0100	[thread overview]
Message-ID: <20071016161618.GB23986@linux-mips.org> (raw)
In-Reply-To: <20071017.011349.03977690.anemo@mba.ocn.ne.jp>

On Wed, Oct 17, 2007 at 01:13:49AM +0900, Atsushi Nemoto wrote:

> On Tue, 16 Oct 2007 16:38:06 +0100, Ralf Baechle <ralf@linux-mips.org> wrote:
> > > Hmm, setting SetPageDcacheDirty() will not make sure the modified data
> > > flushed before reading via the kernel mapping.  The flush_dcache_page()
> > > should be used for such case, shouldn't it?
> > 
> > You're right - and the intent is to _not_ flush the page.  But we're
> > bringing it into the cache, so we better flush it before it will be mapped
> > to userspace.  We want to delay the flush operation.
> 
> I see, but I'm afraid of unnecessary flushing might hide another
> bug...
> 
> Setting SetPageDcacheDirty() for non-modified page looks a bit
> overkill for me.  For example, in copy_user_highpage() we do not flush
> the source page if the page was not mapped to userspace.

kunmap_atomic() is supposed to deal with that.

It doesn't quite on the MIPS implementation so the kernel refuses highmem
with aliasing caches.

  Ralf

      reply	other threads:[~2007-10-16 16:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <S20036863AbXJOPrf/20071015154735Z+80955@ftp.linux-mips.org>
2007-10-15 17:31 ` [MIPS] Fix aliasing bug in copy_user_highpage, take 2 Atsushi Nemoto
2007-10-15 18:28   ` Ralf Baechle
2007-10-16 15:29     ` Atsushi Nemoto
2007-10-16 15:38       ` Ralf Baechle
2007-10-16 16:13         ` Atsushi Nemoto
2007-10-16 16:16           ` Ralf Baechle [this message]

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=20071016161618.GB23986@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=linux-mips@linux-mips.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