From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261389AbUEQN4n (ORCPT ); Mon, 17 May 2004 09:56:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261418AbUEQN4n (ORCPT ); Mon, 17 May 2004 09:56:43 -0400 Received: from sccmmhc92.asp.att.net ([204.127.203.212]:22172 "EHLO sccmmhc92.asp.att.net") by vger.kernel.org with ESMTP id S261389AbUEQN4m (ORCPT ); Mon, 17 May 2004 09:56:42 -0400 Date: Mon, 17 May 2004 08:56:40 -0500 (EST) Message-Id: <20040517.085640.30175416.wscott@bitmover.com> To: akpm@osdl.org Cc: torvalds@osdl.org, elenstev@mesatop.com, lm@bitmover.com, wli@holomorphy.com, hugh@veritas.com, adi@bitmover.com, scole@lanl.gov, support@bitmover.com, linux-kernel@vger.kernel.org Subject: Re: 1352 NUL bytes at the end of a page? From: Wayne Scott In-Reply-To: <20040516231120.405a0d14.akpm@osdl.org> References: <200405162136.24441.elenstev@mesatop.com> <20040516231120.405a0d14.akpm@osdl.org> X-Mailer: Mew version 4.0.64 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org From: Andrew Morton > Well we can stop right there, because the only way someone can get some > more non-zero user data into this page before we memset and write it is by > locking the page beforehand, and block_write_full_page() has the page lock. > (Or they can write stuff into it via mmap, but writing to the page outside > i_size is an application bug). BTW: BitKeeper never opens a writable mmap to a file. The files are read with mmap() and written by fwriting to a tmp file and then renaming over the target. And since we run on Windows, no process has the file open when we are updating it. Still catching up on this thread. -Wayne