From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from black.elm.relay.mailchannels.net (black.elm.relay.mailchannels.net [23.83.212.19]) by sourceware.org (Postfix) with ESMTPS id DC79838515FB for ; Mon, 19 Jul 2021 11:40:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DC79838515FB X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id C0678361683; Mon, 19 Jul 2021 11:40:10 +0000 (UTC) Received: from pdx1-sub0-mail-a15.g.dreamhost.com (100-96-17-89.trex.outbound.svc.cluster.local [100.96.17.89]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 78CD1362226; Mon, 19 Jul 2021 11:40:08 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a15.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.17.89 (trex/6.3.3); Mon, 19 Jul 2021 11:40:10 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Spot-Celery: 0eaee3ed5286eefa_1626694810596_3554322246 X-MC-Loop-Signature: 1626694810595:805676517 X-MC-Ingress-Time: 1626694810595 Received: from pdx1-sub0-mail-a15.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a15.g.dreamhost.com (Postfix) with ESMTP id 3645B8A2B9; Mon, 19 Jul 2021 04:40:08 -0700 (PDT) Received: from [192.168.1.141] (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a15.g.dreamhost.com (Postfix) with ESMTPSA id C9C3F8A26E; Mon, 19 Jul 2021 04:40:06 -0700 (PDT) Subject: Re: [PATCH v9 00/10] malloc hooks removal To: Florian Weimer Cc: libc-alpha@sourceware.org References: <20210719024134.155398-1-siddhesh@sourceware.org> <87v956y32o.fsf@oldenburg.str.redhat.com> <0a0fed30-fe70-ce0c-e80d-130afd0a49b7@sourceware.org> <87lf62y2w3.fsf@oldenburg.str.redhat.com> <87h7gqy2g9.fsf@oldenburg.str.redhat.com> X-DH-BACKEND: pdx1-sub0-mail-a15 From: Siddhesh Poyarekar Message-ID: Date: Mon, 19 Jul 2021 17:10:01 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <87h7gqy2g9.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3485.8 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP, URIBL_BLACK autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2021 11:40:13 -0000 On 7/19/21 4:50 PM, Florian Weimer via Libc-alpha wrote: >> The thing is, set_malloc_state will just not be called without the >> preload, so it doesn't matter what it returns. What we need to make a >> more graceful exit is to detect the existence of a non-NULL >> __malloc_initialize_hook within libc.so and abort. I'm not sure if >> it's worth the effort. > > We could remove both symbols from libc.so.6. That would result in error > that can be found with search engines. __malloc_initialize_hook is defined in the executable so we don't control that, but we could remove malloc_set_state (and maybe also malloc_get_state to be consistent?) and keep it only in libc_malloc_debug.so. May I do it on top of this set though? I'd like to avoid respinning this set if I could. Siddhesh