From: jeffc@world.std.com (Jeffrey D Carter)
Subject: Re: OSF/1 2.0 does not protect program code
Date: Thu, 22 Sep 1994 14:23:17 GMT [thread overview]
Message-ID: <CwJByu.Luo@world.std.com> (raw)
In-Reply-To: 1994Sep21.175300.8122@inca.comlab.ox.ac.uk
mbeattie@sable.ox.ac.uk (Malcolm Beattie) writes:
>In article <35bldr$ata@senior.nectec.or.th>,
>Sompop Kumnoonsate <sompop@morakot.nectec.or.th> wrote:
>>What will happen if the running program file is replaced with a new
>>program file? I found OSF/1 2.0 does not protect the program code.
...
>The behaviour is still present in 3.0: copying a new image over an
>executable which is in use by a process makes all processes using
>that executable start spinning their wheels doing nothing useful.
>Sheesh. I know older Unices had problems with overwriting executables
>that were in use but I would have thought a modern Unix like OSF/1
This was a long-standing problem in the Mach code that OSF started with.
Making ETXTBSY work correctly was "hard enough" that it eventually got
bagged altogether (it became even more of a problem with shared library
executables -- the thing actually exec-ed by the kernel is /sbin/loader,
the real program and the shared libraries are mapped in later).
This finally hacked me off enough that I fixed it in OSF/1 R1.2 (not to
be confused withe DEC OSF/1 1.2, which was based more or less on OSF/1
R1.0.4 + R1.1). In OSF/1 releases since then, static executables, the
loader (either /sbin/loader or /sbin/rtld) and shared executables are
protected against overwrite via ETXTBSY. The shared libraries themselves
are still a problem. Of course, this fix means that the "cp" command would
fail, and you would have to use "mv" to rename the new excutable in place
of the old one.
To fix this "right" involves changes to the buffer cache/VM cache
interactions that just aren't there. Ideally, ETXTBSY would not be necessary,
and the overwrite would cause currently running programs to get private
copies of the "old" version of the file. Mach certainly has sufficient VM
snazziness to support this, but the file system layering in OSF/1 is
challenged enough to make using it difficult.
jeff carter
Interware
jeffc@world.std.com
prev parent reply other threads:[~1994-09-22 14:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-09-16 8:36 OSF/1 2.0 does not protect program code Sompop Kumnoonsate
[not found] ` <1994Sep21.175300.8122@inca.comlab.ox.ac.uk>
1994-09-22 14:23 ` Jeffrey D Carter [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox