Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 8 Mar 2001 16:09:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 8 Mar 2001 16:09:39 -0500 Received: from pizda.ninka.net ([216.101.162.242]:18048 "EHLO pizda.ninka.net") by vger.kernel.org with ESMTP id ; Thu, 8 Mar 2001 16:09:28 -0500 From: "David S. Miller" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15015.62685.775963.665349@pizda.ninka.net> Date: Thu, 8 Mar 2001 13:08:45 -0800 (PST) To: Manfred Spraul Cc: linux-kernel@vger.kernel.org Subject: Re: flush_page_to_ram() question in kernel/ptrace.c In-Reply-To: <3AA7E4E8.5EACF817@colorfullife.com> In-Reply-To: <3AA7E4E8.5EACF817@colorfullife.com> X-Mailer: VM 6.75 under 21.1 (patch 13) "Crater Lake" XEmacs Lucid Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Manfred Spraul writes: > > memcpy(buf, maddr + (addr & ~PAGE_MASK), len); > > flush_page_to_ram(page); > ^^^^^^^^^^^^^^^^^^^^^^ > Is this flush required? > > The memcpy read from the mapping, it didn't write. You have to kick it out of the cache so that future reads on the kernel side don't get stale data with caching setups that allow illegal aliases to form. Later, David S. Miller davem@redhat.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/