From owner-freebsd-current@FreeBSD.ORG Thu Nov 20 01:52:29 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E080F16A4CE for ; Thu, 20 Nov 2003 01:52:29 -0800 (PST) Received: from server.vk2pj.dyndns.org (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id 42D2543F85 for ; Thu, 20 Nov 2003 01:52:28 -0800 (PST) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1])hAK9qLJD068595; Thu, 20 Nov 2003 20:52:21 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.12.9p1/8.12.9/Submit) id hAK9qElf068594; Thu, 20 Nov 2003 20:52:14 +1100 (EST) (envelope-from peter) Date: Thu, 20 Nov 2003 20:52:14 +1100 From: Peter Jeremy To: Lyndon Nerenberg Message-ID: <20031120095214.GA68334@server.vk2pj.dyndns.org> References: <2147483647.1069240727@[192.168.42.6]> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2147483647.1069240727@[192.168.42.6]> User-Agent: Mutt/1.4.1i cc: current@freebsd.org Subject: Re: Unfortunate dynamic linking for everything X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Nov 2003 09:52:30 -0000 On Wed, Nov 19, 2003 at 11:18:47AM -0700, Lyndon Nerenberg wrote: >--On Wednesday, November 19, 2003 12:30 AM -0500 Garance A Drosihn > wrote: > >>have a: chflags ldcache /bin/sh > >Shouldn't that be 'chmod +t /bin/sh' ??? Definitely. Why waste a new bit when there's already a perfectly good one that is (or was) defined for the purpose. As for the implementation, I presume the desired behaviour would be to snapshot the process image (make it copy-on-write) at the point where ld-elf.so invokes main(). You'd probably want LD_BIND_NOW behaviour to minimise the runtime overheads. I don't see any need for this to need massive amounts of RAM - there's no reason why the "snapshot" couldn't be paged normally. I think this would be a big win compared to what we have now - the full benefits of dynamic linking remain and most of the run-time binding overheads are removed. Of course it's not perfect. The snapshot image permanently occupies virtual space (RAM/swap). And there's still the PIC overhead - especially on register-starved architectures like the i386. I wonder how difficult this would be to implement in userland only? Peter