linux-mips
[Top] [All Lists]

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

To: ralf@linux-mips.org
Subject: Re: [MIPS] Fix aliasing bug in copy_user_highpage, take 2.
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Wed, 17 Oct 2007 00:29:16 +0900 (JST)
Cc: linux-mips@linux-mips.org
In-reply-to: <20071015182811.GA20157@linux-mips.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <S20036863AbXJOPrf/20071015154735Z+80955@ftp.linux-mips.org> <20071016.023125.59033711.anemo@mba.ocn.ne.jp> <20071015182811.GA20157@linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
On Mon, 15 Oct 2007 19:28:11 +0100, Ralf Baechle <ralf@linux-mips.org> 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?

---
Atsushi Nemoto

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