*BSD News Article 5235


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel!munnari.oz.au!sgiblab!spool.mu.edu!darwin.sura.net!mojo.eng.umd.edu!pandora.pix.com!stripes
From: stripes@pix.com (Josh Osborne)
Subject: Re: Shared Libs for X11?, was Re: 386bsd -- The New Newsgroup
Message-ID: <BurzEI.C83@pix.com>
Sender: news@pix.com (The News Subsystem)
Nntp-Posting-Host: pandora.pix.com
Organization: Pix Technologies -- The company with no adult supervision
References: <2aFn02vQ22Jx01@JUTS.ccc.amdahl.com> <Buo74w.Jp2@pix.com> <JP107.92Sep18105432@grus.cus.cam.ac.uk>
Date: Fri, 18 Sep 1992 13:13:28 GMT
Lines: 34

In article <JP107.92Sep18105432@grus.cus.cam.ac.uk> jp107@cus.cam.ac.uk (Jon Peatfield) writes:
>In <Buo74w.Jp2@pix.com> stripes@pix.com (Josh Osborne) correctly states:
[...it is hard to share some pages after runtime linking...]
>But, by being careful one can arrange to keep all the parts of the
>program which must be modified in the data segment of the program,
>thus allowing the text segment to remain shared and unmodified after
>final linkage.  Thus while the data segment is a bit bigger, and
>unsharable most of the program is sharable and can be loaded r/o into
>memory.

We could do this, but I would prefer to have the pages mapped non-writable
after the runtime linker is done.  There are also somewhat complex ways
that we *could* share the pages, I don't know if they would be worth it,
and if they are we should keep it OUT of the kernel and in user space.

>LD_LIBRARY_PATH or equivalent is too good a thing to loose.  Look at
>the hash that HP made of shared libs...

I think it is a good thing to keep.  It can save your butt while you test
a new shared lib.  It can also let you use some programs with one version
of a lib and other programs with another (like programs you don't have
source to that depend on a big in the old version of libfoo.so...).  It
also lets diffrent users use diffrent libs.  In fact I think it should
be expanded a little to let you safely use LD_LIBRARY_PATH with setuid/setgid
programs, which would require a list of places the runtime linker can look
if the user asks for shared libs if a program is setuid/setgid...

I can live without all this - but we will need to be WAY more careful.
-- 
           stripes@pix.com              "Security for Unix is like
      Josh_Osborne@Real_World,The          Multitasking for MS-DOS"
      "The dyslexic porgramer"                  - Kevin Lockwood
We all agree on the necessity of compromise.  We just can't agree on
when it's necessary to compromise.       - Larry Wall