[Top] [All Lists]

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

To: Atsushi Nemoto <>
Subject: Re: [MIPS] Fix aliasing bug in copy_user_highpage, take 2.
From: Ralf Baechle <>
Date: Tue, 16 Oct 2007 16:38:06 +0100
In-reply-to: <>
Original-recipient: rfc822;
References: <S20036863AbXJOPrf/> <> <> <>
User-agent: Mutt/1.5.14 (2007-02-12)
On Wed, Oct 17, 2007 at 12:29:16AM +0900, Atsushi Nemoto wrote:

> On Mon, 15 Oct 2007 19:28:11 +0100, Ralf Baechle <> wrote:
> > After copy_from_user_page the page will reside in the D-cache.  So just
> > in case it ever gets mapped to userspace and modified there we better
> > make sure its kernel address will get flushed before mapping it to user
> > space.  If not, we might see stale data if the page got modified under
> > its userspace address.
> 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.


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