[Top] [All Lists]

Re: [MIPS] Fix aliasing bug in copy_user_highpage, take 2.

Subject: Re: [MIPS] Fix aliasing bug in copy_user_highpage, take 2.
From: Atsushi Nemoto <>
Date: Wed, 17 Oct 2007 01:13:49 +0900 (JST)
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <>
On Tue, 16 Oct 2007 16:38:06 +0100, Ralf Baechle <> 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

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.

Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>