From owner-freebsd-current@FreeBSD.ORG Mon May 26 02:05:05 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 7893737B404; Mon, 26 May 2003 02:05:05 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E92C43F75; Mon, 26 May 2003 02:05:04 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from athlon.pn.xcllnt.net (athlon.pn.xcllnt.net [192.168.4.3]) by ns1.xcllnt.net (8.12.9/8.12.9) with ESMTP id h4Q954wk047719; Mon, 26 May 2003 02:05:04 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from athlon.pn.xcllnt.net (localhost [127.0.0.1]) by athlon.pn.xcllnt.net (8.12.9/8.12.9) with ESMTP id h4Q954rv002818; Mon, 26 May 2003 02:05:04 -0700 (PDT) (envelope-from marcel@athlon.pn.xcllnt.net) Received: (from marcel@localhost) by athlon.pn.xcllnt.net (8.12.9/8.12.9/Submit) id h4Q954k2002817; Mon, 26 May 2003 02:05:04 -0700 (PDT) Date: Mon, 26 May 2003 02:05:03 -0700 From: Marcel Moolenaar To: Brad Knowles Message-ID: <20030526090503.GA2738@athlon.pn.xcllnt.net> References: <20030525061524.H30007@sasami.jurai.net> <20030525084629.R30007@sasami.jurai.net> <20030525222955.GA826@athlon.pn.xcllnt.net> <20030525190744.A86964@sasami.jurai.net> <20030526001924.GA1272@athlon.pn.xcllnt.net> <20030525202140.Y86964@sasami.jurai.net> <20030526053120.GB1941@athlon.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i cc: current@FreeBSD.ORG cc: "Matthew N. Dodd" 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 09:05:05 -0000 On Mon, May 26, 2003 at 10:28:42AM +0200, Brad Knowles wrote: > At 10:31 PM -0700 2003/05/25, Marcel Moolenaar wrote: > > > Hence, prebind information is decoupled from the executable. One > > of the more obvious complexities is the fact that the naming scheme > > is such that multiple binaries can have the same prebind cache file. > > The collision is currently not handled, other than making sure that > > the prebind information for binary A1 is not used by binary A2. But > > other complexities exist. What if by some unlucky draw of faith you > > have two totally independent executables that both resolve to the > > same prebind file *and* happen to have the same build ID? You have > > an undetectable collision. > > How painful would it be to do a checksum (ideally, MD5 hash) of > the binary in question? Or at least recording path to the binary > within the prebind cache file? Or maybe file metadata like the > ownership, permissions, and date/time stamp? Not painful, but I don't think it covers the problem. It doesn't matter where you get the ELF files from or what the permissions are, you need to make sure that the mix of ELF files (executable and shared libraries) is the same as when the prebinding cache was constructed. You also need to take link order into account if you want to handle multiple instances of weak symbols. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net