From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cyan.elm.relay.mailchannels.net (cyan.elm.relay.mailchannels.net [23.83.212.47]) by sourceware.org (Postfix) with ESMTPS id 7A88F3888035 for ; Tue, 6 Jul 2021 13:08:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7A88F3888035 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 DF31B5A1C16; Tue, 6 Jul 2021 13:00:25 +0000 (UTC) Received: from pdx1-sub0-mail-a29.g.dreamhost.com (100-96-27-210.trex.outbound.svc.cluster.local [100.96.27.210]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id BC7855A1C62; Tue, 6 Jul 2021 13:00:13 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a29.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.27.210 (trex/6.3.3); Tue, 06 Jul 2021 13:00:25 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Oafish-Exultant: 41efb7d0457771c6_1625576415011_3466018877 X-MC-Loop-Signature: 1625576415009:2172163424 X-MC-Ingress-Time: 1625576415009 Received: from pdx1-sub0-mail-a29.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a29.g.dreamhost.com (Postfix) with ESMTP id 3ED5E7F1F3; Tue, 6 Jul 2021 06:00:10 -0700 (PDT) Received: from [192.168.1.136] (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-a29.g.dreamhost.com (Postfix) with ESMTPSA id 7BA817F115; Tue, 6 Jul 2021 06:00:07 -0700 (PDT) Subject: Re: [PATCH v5 1/8] Move malloc hooks into a compat DSO To: Florian Weimer Cc: libc-alpha@sourceware.org References: <20210705170814.4132997-1-siddhesh@sourceware.org> <20210705170814.4132997-2-siddhesh@sourceware.org> <8735sriw5u.fsf@oldenburg.str.redhat.com> X-DH-BACKEND: pdx1-sub0-mail-a29 From: Siddhesh Poyarekar Message-ID: <7f71ca86-3b98-7b26-a52f-0e191f015ee2@sourceware.org> Date: Tue, 6 Jul 2021 18:30: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: <8735sriw5u.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=-3494.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, 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 autolearn=ham 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: Tue, 06 Jul 2021 13:08:21 -0000 On 7/6/21 3:47 PM, Florian Weimer via Libc-alpha wrote: > * Siddhesh Poyarekar: > >> Remove all malloc hook uses from core malloc functions and move it >> into a new library libc_malloc_debug.so. With this, the hooks now no >> longer have any effect on the core library. > > There are still a few references to libmalloc_compathooks. Fixed locally. >> diff --git a/elf/Makefile b/elf/Makefile >> index 698a6ab985..b432e78d39 100644 >> --- a/elf/Makefile >> +++ b/elf/Makefile >> @@ -156,7 +156,7 @@ $(inst_auditdir)/sotruss-lib.so: $(objpfx)sotruss-lib.so $(+force) > >> @@ -1561,7 +1558,8 @@ $(objpfx)tst-nodelete-dlclose.out: $(objpfx)tst-nodelete-dlclose-dso.so \ >> $(objpfx)tst-nodelete-dlclose-plugin.so >> >> tst-env-setuid-ENV = MALLOC_CHECK_=2 MALLOC_MMAP_THRESHOLD_=4096 \ >> - LD_HWCAP_MASK=0x1 >> + LD_HWCAP_MASK=0x1 \ >> + LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so > > I don't think this test needs the debugging allocator, it uses getenv to > see if the environment has been scrubbed. You're right, it doesn't. I'll remove that. > In general, it looks like it's time to add support for mtrace tests to > the setsuite (that is, tests-mtrace like tests-time64). ... or tests-mcheck/tests-malloc-check. Would you be OK with having the test driver call mtrace() at all times? Only the tests in tests-mtrace (which for starters we could add all tests in malloc to) will actually have any impact. Thanks, Siddhesh