From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from crocodile.elm.relay.mailchannels.net (crocodile.elm.relay.mailchannels.net [23.83.212.45]) by sourceware.org (Postfix) with ESMTPS id F0D46385840D for ; Wed, 3 Nov 2021 03:12:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F0D46385840D 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 C487E921282; Wed, 3 Nov 2021 03:12:36 +0000 (UTC) Received: from pdx1-sub0-mail-a300.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 7DC1E921253; Wed, 3 Nov 2021 03:12:36 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a300.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.105.57.75 (trex/6.4.3); Wed, 03 Nov 2021 03:12:36 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Thread-Interest: 0555ef82486c9e41_1635909156665_2597290664 X-MC-Loop-Signature: 1635909156665:1571519645 X-MC-Ingress-Time: 1635909156664 Received: from [192.168.1.174] (unknown [1.186.122.141]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a300.dreamhost.com (Postfix) with ESMTPSA id 4HkWzQ0w9nz1RS; Tue, 2 Nov 2021 20:12:33 -0700 (PDT) Message-ID: Date: Wed, 3 Nov 2021 08:42:28 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: sbrk() failure while processing tunables Content-Language: en-US To: Adhemerval Zanella , Libc-alpha , Carlos O'Donell , DJ Delorie References: <65280714-a0f4-a649-204d-bf12d0972bb9@sourceware.org> <371b8036-fdd5-53ff-f0d5-1838f532341b@linaro.org> From: Siddhesh Poyarekar In-Reply-To: <371b8036-fdd5-53ff-f0d5-1838f532341b@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3488.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_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_SBL, SPF_HELO_NONE, SPF_NEUTRAL, TXREP 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: Wed, 03 Nov 2021 03:12:39 -0000 On 11/3/21 01:26, Adhemerval Zanella via Libc-alpha wrote: >> Straight up mmap should be fine I think.  AFAICT, we should have to allocate exactly once, to copy the tunable string. > > Does it make sense to use rtld_malloc then to try optimize the allocation a bit? That'll work only for the dynamic case, you'll need special code for static linking then. Alternatively, the rtld_malloc code looks sufficiently independent that it could be split out into its own file and included directly into dl-tunables.c. Siddhesh