From owner-freebsd-current@FreeBSD.ORG Sun May 25 17:33:33 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 1F81637B401 for ; Sun, 25 May 2003 17:33:33 -0700 (PDT) Received: from sasami.jurai.net (sasami.jurai.net [66.92.160.223]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31F0643F3F for ; Sun, 25 May 2003 17:33:32 -0700 (PDT) (envelope-from mdodd@FreeBSD.ORG) Received: from sasami.jurai.net (sasami.jurai.net [66.92.160.223]) by sasami.jurai.net (8.12.9/8.12.9) with ESMTP id h4Q0XV3q004109; Sun, 25 May 2003 20:33:31 -0400 (EDT) (envelope-from mdodd@FreeBSD.ORG) Date: Sun, 25 May 2003 20:33:31 -0400 (EDT) From: "Matthew N. Dodd" X-X-Sender: winter@sasami.jurai.net To: Marcel Moolenaar In-Reply-To: <20030526001924.GA1272@athlon.pn.xcllnt.net> Message-ID: <20030525202140.Y86964@sasami.jurai.net> References: <20030525061524.H30007@sasami.jurai.net> <20030525222955.GA826@athlon.pn.xcllnt.net> <20030526001924.GA1272@athlon.pn.xcllnt.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: current@FreeBSD.ORG Subject: Re: Preliminary ELF prebinding patches available. 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: Mon, 26 May 2003 00:33:33 -0000 On Sun, 25 May 2003, Marcel Moolenaar wrote: > > I was more concerned with simplicity; the method I use solves the problem > > with minimal effort and complexity. The combination of time() + random() > > + filename will not collide on a single box. > > But it can across NFS, right? Uh... If you want to share /var/db/prebind via NFS I suppose you can. I'm not sure how a practical NFS environment would result in a greater chance of collisions. Regardless, there is no real penalty for collisions (other than prebinding not being available for that executable.) > > I'll be adding a platform identifier to the file header. All I'm > > concerned with is being able to reject a file if its not for the current > > platform. I have no expectation of cross-generating prebinding files. > > Please keep that option open. Not only do we have to deal with byte- > order on a single platform, we also have to keep an eye on emulation > layers (ia32 on ia64 and ia32 on amd64). Its simply not possible to cross-generate prebinding files. Period. (You're of course welcome to implement a totally standalone utility that duplicates much of the functionality that rtld-elf provides.) > Decoupling the program from its prebinding information can create all > sorts of nasty (ie unexpected) complexities. Uh, what? I'm not parsing this. > What are the major reasons for not editing the executable in your > opinion? Besides it not working? It is not possible for rtld-elf to access the section header, let alone additional section data in a clean manner. Furthermore, rtld-elf is not provided with a valid file handle for the main executable so hacks to access section data of libraries won't actually work for the main executable. I ran around in circles until I'd figured all this out. -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax | | http://www.jurai.net/~winter | For Great Justice! | ISO8802.5 4ever |