From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932276AbWCGTjF (ORCPT ); Tue, 7 Mar 2006 14:39:05 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932150AbWCGTjE (ORCPT ); Tue, 7 Mar 2006 14:39:04 -0500 Received: from gold.veritas.com ([143.127.12.110]:17854 "EHLO gold.veritas.com") by vger.kernel.org with ESMTP id S932276AbWCGTjD (ORCPT ); Tue, 7 Mar 2006 14:39:03 -0500 X-IronPort-AV: i="4.02,172,1139212800"; d="scan'208"; a="56800067:sNHT31989160" Date: Tue, 7 Mar 2006 19:39:55 +0000 (GMT) From: Hugh Dickins X-X-Sender: hugh@goblin.wat.veritas.com To: Hui Yu cc: linux-kernel@vger.kernel.org, Andi Kleen , Andrea Arcangeli Subject: Re: [PATCH] mm: data overlapping in page struct In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 07 Mar 2006 19:39:00.0545 (UTC) FILETIME=[C8698B10:01C6421E] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 7 Mar 2006, Hui Yu wrote: > This patch is to fix a data overlapping issue in struct page. The > problem was introduced a few months ago by "split page table lock" > change in which mapping is moved into the same union with ptl. Since > private has fixed length (size of unsigned long), depending on config > options, ptl may have larger size than private. In this case, ptl will > overlap to mapping and may overwrite the original data in mapping. > The simplest way of fixing this is to move mapping out of the union, as > in this patch. There may be better approaches; I'll leave it to the > experts more familiar with this part of code. Nak. We use ->mapping for page cache pages, or pages mapped into user address space. We use ->ptl for page table pages of user address space. Where is it that you expect a data page to be used as a page table page at the same time? This 2.6.16 change was precisely to share that part of the struct page between mapping and ptl, so as to bring struct page back down to its 2.6.14 size on the non-DEBUG_SPINLOCK configurations. Hugh