Re: Security question: "Text file busy" overwriting executables but not shared libraries?

Jamie Lokier
2001-10-15T11:25:47Z

Aaron Lehmann wrote:
> > > But it does have the advantage of allowing the sharing of memory, does
> > > it not?
> >
> > Only if you are going to write to the data.
>
> Why? If gcc and another application read the source file with an
> mmap() with the right parameters (read-only), it would only be shared
> between them, as I understand it. If they both read() the file into
> private buffers those can not be shared.

And furthermore, the private buffers cannot be shared with the
filesystem's page cache.

-- Jamie