Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S267759AbUIPIov (ORCPT ); Thu, 16 Sep 2004 04:44:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S267863AbUIPIov (ORCPT ); Thu, 16 Sep 2004 04:44:51 -0400 Received: from hermine.aitel.hist.no ([158.38.50.15]:16910 "HELO hermine.aitel.hist.no") by vger.kernel.org with SMTP id S267759AbUIPIos (ORCPT ); Thu, 16 Sep 2004 04:44:48 -0400 Message-ID: <4149539D.9070001@hist.no> Date: Thu, 16 Sep 2004 10:49:33 +0200 From: Helge Hafting User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040830) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrea Arcangeli CC: William Lee Irwin III , Andrew Morton , linux-kernel@vger.kernel.org, an.li.wang@intel.com Subject: Re: truncate shows non zero data beyond the end of the inode with MAP_SHARED References: <20040915122920.GA4454@dualathlon.random> <20040915210106.GX9106@holomorphy.com> <20040915145524.079a8694.akpm@osdl.org> <20040915220016.GC9106@holomorphy.com> <20040915220819.GF15426@dualathlon.random> In-Reply-To: <20040915220819.GF15426@dualathlon.random> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1390 Lines: 41 Andrea Arcangeli wrote: >On Wed, Sep 15, 2004 at 03:00:16PM -0700, William Lee Irwin III wrote: > > >>William Lee Irwin III wrote: >> >> >>>>Zeroing the final partial page during expanding truncate (flushing TLB) >>>>sounds like a reasonable half measure; we don't do anything at the moment. >>>> >>>> >>On Wed, Sep 15, 2004 at 02:55:24PM -0700, Andrew Morton wrote: >> >> >>>Sure about that? block_truncate_page() gets called. >>> >>> >>So it does; then the hard parts are what's biting aa. >> >> > >block_truncate_page is unrelated with this issue, it's called on the >_new_ partial page generated by truncate, not on the _old_ partial page >that is being extended to be a _full_ page (with garbage inside between >the old_i_size and PAGE_ALIGN(old_i_size)). > > Could this "garbage" possibly be confidential data? I.e. one user repeatedly makes and mmaps a 1-byte file, extends it to 4k, and looks at the 4095 bytes of "garbage". Maybe he finds some "interesting stuff" when someone else's confidential file just got dropped from pagecache so he could mmap this 1-byte file? Helge Hafting - 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/