Re: Q about pagecache data never written to disk

From: Nick Piggin
Date: Thu Sep 09 2004 - 08:54:32 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/