Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264085AbUIINvd (ORCPT ); Thu, 9 Sep 2004 09:51:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264098AbUIINvd (ORCPT ); Thu, 9 Sep 2004 09:51:33 -0400 Received: from smtp206.mail.sc5.yahoo.com ([216.136.129.96]:49046 "HELO smtp206.mail.sc5.yahoo.com") by vger.kernel.org with SMTP id S264085AbUIINvA (ORCPT ); Thu, 9 Sep 2004 09:51:00 -0400 Message-ID: <41405B51.20705@yahoo.com.au> Date: Thu, 09 Sep 2004 23:32:01 +1000 From: Nick Piggin User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040810 Debian/1.7.2-2 X-Accept-Language: en MIME-Version: 1.0 To: Pavel Machek CC: Andrew Morton , Andrey Savochkin , linux-kernel@vger.kernel.org Subject: Re: Q about pagecache data never written to disk References: <20040905120147.A9202@castle.nmd.msu.ru> <20040905035233.6a6b5823.akpm@osdl.org> <20040905154336.B9202@castle.nmd.msu.ru> <20040905140040.58a5fcdc.akpm@osdl.org> <20040909123957.GB1065@elf.ucw.cz> <41405773.3090403@yahoo.com.au> <20040909133703.GA32038@atrey.karlin.mff.cuni.cz> In-Reply-To: <20040909133703.GA32038@atrey.karlin.mff.cuni.cz> 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: 1080 Lines: 33 Pavel Machek wrote: >>>kernel realizes that there's not enough disk space, and discard >>>changes, therefore /tmp/sign.me reverts to previous, evil, content. >>> >> >>root would have to make that change while user has the file open, >>and should welcome the subsequent unleashing of evil content as a >>valuable lesson. > > > Really? I thought that writeback is not synchronous at close() > time.... Hmm.... It probably could be in case of mmap.... > writeback isn't, but the pages will get marked dirty at unmap. But I think I am wrong actually - I don't actually see why the user would have to have the file open. > It is still pretty unexpected. Like "root sees you have that file > open, so he stops you via ptrace".... but ok.... Or maybe cp /tmp/sign.me ~/ chown ... ~/sign.me chmod ... ~/sign.me mv ~/sign.me /tmp/signed - 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/