From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 8C46B385843E for ; Fri, 21 Jul 2023 14:33:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8C46B385843E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689949992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O38lMSz9VZur7TBb1uG1Y764Ls20AvrMn2+6W5/QJDQ=; b=Q/kDfOH1HWQhhvYRiKqvzwr74khfkEVQJHY5uH5nZmWXNzPQ1yHDCjTnOdpVrS5j+KhDjh oG8V6ccwiXQ2jMwq7K2icmynTvborzyPggYsOlRc7Flqog3FH8J/olnp6ecxkqP4rMPsRb 5it6mIjxPnnL3VLMAD434nxvMP9odF8= Received: from mail-yw1-f198.google.com (mail-yw1-f198.google.com [209.85.128.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-573-R9WUq9mjMnGIop-Hj5_zVA-1; Fri, 21 Jul 2023 10:33:10 -0400 X-MC-Unique: R9WUq9mjMnGIop-Hj5_zVA-1 Received: by mail-yw1-f198.google.com with SMTP id 00721157ae682-56942667393so19635327b3.2 for ; Fri, 21 Jul 2023 07:33:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689949989; x=1690554789; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=O38lMSz9VZur7TBb1uG1Y764Ls20AvrMn2+6W5/QJDQ=; b=iinQBckTWQtqzLYkAY0DWRI7IqER3oNomWZoQVSC4/QyL+Od+Mn0wwmFshtcK44/Sn 6l1dohaeLQHPoeAtjd/h72rY1/JDEwKIAjR6KipVEZI0nLEtJKEqQz9LiWKXByyLgUEZ cNVV3koXlDfSvbHRKdcjloDU5onPkWpWAlYJ/9J5XcNcGZUgTgMIYqkhuePVOYEsZhlj QaoizLabgRUfGjrsSzlPi+VxTijht9si+aD917BYUYQ4+NO5GcwZ1g+o9PDJRk4S8orS 3gr+zr4N/a2r7KjE1wlWnENV+asaG8NYxRxGbpYb9FRTSkcVqpQo4iHAhd0CJXzxZU89 yLxA== X-Gm-Message-State: ABy/qLYeD80pmKQij7iJqHb7jaCUtfUewTkyuMCNtnOGT9OzLZD5f6xE Dt7eoYEEKpMQ9pQ08DjswlCAWHJz3MtewTKBQrQxcfWX8Zl/MNShf5SlI5d/m9wOuo4rwgPbuwy 9v4O+9AUXs+cv1LsU1xCCLg== X-Received: by 2002:a81:4808:0:b0:579:efb4:7d08 with SMTP id v8-20020a814808000000b00579efb47d08mr220143ywa.27.1689949989509; Fri, 21 Jul 2023 07:33:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlEqGE8cIQZu4sQ091wxUCQG09U90YxkV7vn3qUofyOU3iFoQTvA8EVz/L79HJpM0ib9QXrbng== X-Received: by 2002:a81:4808:0:b0:579:efb4:7d08 with SMTP id v8-20020a814808000000b00579efb47d08mr220123ywa.27.1689949989211; Fri, 21 Jul 2023 07:33:09 -0700 (PDT) Received: from [192.168.0.241] ([198.48.244.52]) by smtp.gmail.com with ESMTPSA id c2-20020a0dda02000000b0057069c60799sm917275ywe.53.2023.07.21.07.33.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Jul 2023 07:33:08 -0700 (PDT) Message-ID: Date: Fri, 21 Jul 2023 10:33:07 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH 2.34] debug: Mark libSegFault.so as NODELETE To: Florian Weimer , libc-alpha@sourceware.org Cc: libc-stable@sourceware.org References: <87cz0mmsn0.fsf@oldenburg.str.redhat.com> From: Carlos O'Donell Organization: Red Hat In-Reply-To: <87cz0mmsn0.fsf@oldenburg.str.redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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: On 7/20/23 12:53, Florian Weimer via Libc-stable wrote: > The signal handler installed in the ELF constructor cannot easily > be removed again (because the program may have changed handlers > in the meantime). Mark the object as NODELETE so that the registered > handler function is never unloaded. Agreed. This is a safe default to take given the usage of this DSO. LGTM for backport into all stables branches with libSegFault.so. Reviewed-by: Carlos O'Donell > Submitting this for 2.34 because libSegFault.so was removed in 2.35. > Verified using readelf -dW that NODELETE is now set on libSegFault.so. > (Note that there is no lib prefix on the LDFLAGS variable.) > > --- > debug/Makefile | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/debug/Makefile b/debug/Makefile > index 71248e0d45..9fbc40dc69 100644 > --- a/debug/Makefile > +++ b/debug/Makefile > @@ -213,6 +213,8 @@ extra-libs-others = $(extra-libs) > > libSegFault-routines = segfault > libSegFault-inhibit-o = $(filter-out .os,$(object-suffixes)) > +# libSegFault.so installs a signal handler in its ELF constructor. > +LDFLAGS-SegFault.so = -Wl,--enable-new-dtags,-z,nodelete > > libpcprofile-routines = pcprofile > libpcprofile-inhibit-o = $(filter-out .os,$(object-suffixes)) > > base-commit: cad3adf4ddeada37912c1c13b59a2ea5dd5d2832 > -- Cheers, Carlos.