Cc: Arjan van de Ven <arjan@...>, Eric Paris <eparis@...>, <linux-kernel@...>, <malware-list@...>, <andi@...>, <riel@...>, <greg@...>, <tytso@...>, <viro@...>, <alan@...>, <peterz@...>, <hch@...>
if you check the file at the time you mmap it and don't expect other
programs to change the file under you while you are reading it, there's
nothing to worry about.
shared mmap with one program being able to write to it is a expecially
hard case of the general problem that if someone writes to a file as you
are serving it, you don't know what goes out, it may be part of the old
file and part of the new file. it's just easier to see this problem with
mmap and harder to catch it.
David Lang
--