From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1696 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: ldso: dlclose. Date: Thu, 23 Aug 2012 08:48:16 -0400 Message-ID: <20120823124816.GP27715@brightrain.aerifal.cx> References: <503113C5.5010206@gmail.com> <20120820004803.GA27715@brightrain.aerifal.cx> <5603ddad712718518eed1430f5d00450@exys.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1345726007 2225 80.91.229.3 (23 Aug 2012 12:46:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Aug 2012 12:46:47 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1697-gllmg-musl=m.gmane.org@lists.openwall.com Thu Aug 23 14:46:48 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1T4Wo9-0005rj-KW for gllmg-musl@plane.gmane.org; Thu, 23 Aug 2012 14:46:45 +0200 Original-Received: (qmail 30158 invoked by uid 550); 23 Aug 2012 12:46:43 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 30148 invoked from network); 23 Aug 2012 12:46:43 -0000 Content-Disposition: inline In-Reply-To: <5603ddad712718518eed1430f5d00450@exys.org> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1696 Archived-At: On Thu, Aug 23, 2012 at 02:39:38PM +0200, Arvid E. Picciani wrote: > On Sun, 19 Aug 2012 20:48:03 -0400, Rich Felker wrote: > > >To elaborate, removing a DSO from a process's address space is highly > >non-trivial and error-prone. > > In fact it doesn't even work correctly in glibc. > It's just that usually no one notices. Indeed, and they closed my bug report about it as invalid. I've refiled the bug with binutils, which has the -z nodelete option, requesting that this option be made default. Only libraries intentionally marked as unload-safe should be unloadable. Anyway, unless the issue is fixed in binutils so that the vast majority of libraries are marked non-unloadable, I don't see anything we can do in musl. "glibc does it that way too" is not an excuse for adding unsafe/non-robust behavior to musl. Rich