From owner-freebsd-arch@FreeBSD.ORG Tue May 6 09:17:33 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 924F337B4AF for ; Tue, 6 May 2003 09:17:33 -0700 (PDT) Received: from gw.nectar.cc (gw.nectar.cc [208.42.49.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id 611C943FA3 for ; Tue, 6 May 2003 09:17:32 -0700 (PDT) (envelope-from nectar@celabo.org) Received: from madman.celabo.org (madman.celabo.org [10.0.1.111]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "madman.celabo.org", Issuer "celabo.org CA" (verified OK)) by gw.nectar.cc (Postfix) with ESMTP id AF35E44; Tue, 6 May 2003 11:17:31 -0500 (CDT) Received: by madman.celabo.org (Postfix, from userid 1001) id 2568978C66; Tue, 6 May 2003 11:17:33 -0500 (CDT) Date: Tue, 6 May 2003 11:17:33 -0500 From: "Jacques A. Vidrine" To: Harti Brandt Message-ID: <20030506161732.GB78486@madman.celabo.org> Mail-Followup-To: "Jacques A. Vidrine" , Harti Brandt , freebsd-arch@FreeBSD.org References: <20030501182820.GA53641@madman.celabo.org> <20030505110601.H53365@beagle.fokus.fraunhofer.de> <20030505175426.GA19352@madman.celabo.org> <20030506093754.B838@beagle.fokus.fraunhofer.de> <20030506092519.GA3158@cirb503493.alcatel.com.au> <20030506112711.K838@beagle.fokus.fraunhofer.de> <20030506153641.GI77708@madman.celabo.org> <20030506175400.F631@beagle.fokus.fraunhofer.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030506175400.F631@beagle.fokus.fraunhofer.de> X-Url: http://www.celabo.org/ User-Agent: Mutt/1.5.3i-ja.1 cc: freebsd-arch@FreeBSD.org Subject: Re: Re: `Hiding' libc symbols X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2003 16:17:34 -0000 On Tue, May 06, 2003 at 05:59:21PM +0200, Harti Brandt wrote: > Please! I know what I'm talking about. I have been hit by the broken > shared library design in BSD/OS and I have been hit by all those > non-standard functions with names that each application writer loves to > use in our libc (err for example), but I have also on occasions replace > exit with abort to find a very obscure bug, I sometimes use a debugging > libmalloc, I know libraries that replace str* functions to find bound > errors. You have yet to indicate how hiding some additional symbols in libc, using the method that we already have, will cause this hair loss to which you are referring. You can certainly replace `exit' with `abort' now if you want. As a matter of fact, `exit' is already `hidden' for a few years, and I haven't seen you complain earlier. % nm -D --defined-only /usr/lib/libc.so | grep '\b_\?exit\b' 0004368c W _exit 000a5558 T exit > I'm just telling that simply hiding all symbols without caring of what > that may cause is certainly wrong. I concede that might be the case. It seems clear that hiding the allocators might be of questionable use. Anything else? > And stating that this will > automagically make buggy ports un-buggier is also wrong. Well, we've already had at least one port where it most certainly made a difference. The issue is one of safety and robustness ... we should not be calling into application's functions _on accident_. > Go ahead with non-standard functions, but make sure that you don't break > ports when doing this with standard functions. Quick question: is strlcpy a standard function, or a non-standard function? What else are standard functions? Many `standard' functions are already hidden. I don't expect much, if any, breakage, but testing against the port cluster would be advisable before committing en masse. Actually, even if we had consensus to go this route, I'm not sure that one would want to do it en masse? Cheers, -- Jacques Vidrine . NTT/Verio SME . FreeBSD UNIX . Heimdal nectar@celabo.org . jvidrine@verio.net . nectar@freebsd.org . nectar@kth.se