From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id 40A993858D28 for ; Fri, 24 Mar 2023 11:19:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 40A993858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=deneb.enyo.de Received: from [172.17.203.2] (port=56447 helo=deneb.enyo.de) by albireo.enyo.de ([172.17.140.2]) with esmtps (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) id 1pffRj-00Ezd9-Ud; Fri, 24 Mar 2023 11:18:59 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.96) (envelope-from ) id 1pffRj-0013gR-2W; Fri, 24 Mar 2023 12:18:59 +0100 From: Florian Weimer To: Andreas Schwab via Libc-alpha Cc: Andreas Schwab Subject: Re: [PATCH] dlopen: skip debugger notification for DSO loaded from sprof (bug 30258) References: Date: Fri, 24 Mar 2023 12:18:59 +0100 In-Reply-To: (Andreas Schwab via Libc-alpha's message of "Thu, 23 Mar 2023 17:33:14 +0100") Message-ID: <87ileq2y8s.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * Andreas Schwab via Libc-alpha: > Avoid inconsistent state in the debugger interface. > --- > elf/dl-load.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/elf/dl-load.c b/elf/dl-load.c > index 9a0e40c0e9..39c63ff1b3 100644 > --- a/elf/dl-load.c > +++ b/elf/dl-load.c > @@ -1483,6 +1483,10 @@ cannot enable executable stack as shared object requires"); > /* Now that the object is fully initialized add it to the object list. */ > _dl_add_to_namespace_list (l, nsid); > > + /* Skip auditing and debugger notification when called from 'sprof'. */ > + if (mode & __RTLD_SPROF) > + return l; > + > /* Signal that we are going to add new objects. */ > struct r_debug *r = _dl_debug_update (nsid); > if (r->r_state == RT_CONSISTENT) Can we add a test for this? Thanks.