From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id EE330202BB for ; Mon, 11 Mar 2019 18:39:47 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; q=dns; s=default; b=gSPE aTMmTcZNMlyRcVIPKUHlD7/DOPqEQGXr+zy8MPsuRR3osvWktm9CUR3ESArG6CTe njbicuqwQ1WRamduT4g2AiVRI+NQLJkkYV6HB0adtoLk/gIiowsC+PMFO4NgX1BX y9Ss/kv/5FK6PiIjI78vgFmtB8JIi6BijMORepM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; s=default; bh=PmiNpDx4g2 Gbog2gOuYbdstchF4=; b=XQbH/bUxUzlsznRWWr3eFtkFh0DdX8WF+nz8bjg8Mb OPSJ6lU9RWHJCnUb8TmX0j9qXkUfOtFHGCviYn9RVKbC1Dpk54RF5DIx3bOlObO4 E6aU3ccm4OYBw9g+D6ZYD5rSEVi6AmrEiJovuo0XCvFaxHh1VgjbNUJ4x+xcaE/S w= Received: (qmail 14410 invoked by alias); 11 Mar 2019 18:39:46 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 14397 invoked by uid 89); 11 Mar 2019 18:39:45 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mailbackend.panix.com MIME-Version: 1.0 References: <871s3lgtvu.fsf@oldenburg2.str.redhat.com> <7ad76477-c936-5db4-91be-c304ea322299@redhat.com> <8736ntxwe5.fsf@oldenburg2.str.redhat.com> <4f7706a4-b914-0ba5-84f6-352703a54e82@redhat.com> <87d0mxwd8n.fsf@oldenburg2.str.redhat.com> In-Reply-To: <87d0mxwd8n.fsf@oldenburg2.str.redhat.com> From: Zack Weinberg Date: Mon, 11 Mar 2019 14:39:31 -0400 Message-ID: Subject: Re: Removing longjmp error handling from the dynamic loader To: Florian Weimer Cc: "Carlos O'Donell" , GNU C Library Content-Type: text/plain; charset="UTF-8" On Mon, Mar 11, 2019 at 1:08 PM Florian Weimer wrote: > * Zack Weinberg: > > I haven't thought about this much, but I don't like the idea of > > increasing the set of functions potentially executed during symbol > > resolution to the tune of the entire unwinder, because of the unusual > > constraints on code executed in that context (e.g. must not take > > locks, must protect itself from cancellation, must not touch the > > normal errno). > > This is a good point which I had not considered. > > My position is that errors during symbol resolution in lazy binding are > never recoverable. If the error is not recoverable, there is no need to > do any unwinding at all. We currently get this wrong for init/fini > (bug 24304). I tend to agree with this. I'm also honestly dubious of the value of lazy binding anymore, but that we should think about separately. > Rich Felker brought up this matter in conjunction with IFUNC resolvers. > These can be called during relocation processing (from dlopen) or lazy > binding, when they themselves trigger lazy binding. I think these > errors should not be recoverable, either, whether they happen during > relocation processing or lazy binding. But there is a narrow edge case > (IFUNC resolver called during relocation processing which triggers lazy > binding which fails in symbol lookup) I wonder how practical it would be to discover the set of symbols that an IFUNC resolver might attempt to use, and resolve those before calling into the IFUNC resolver. IFUNCs are still new enough that we could require additional annotations in the object file if that would help. zw