From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eastern.birch.relay.mailchannels.net (eastern.birch.relay.mailchannels.net [23.83.209.55]) by sourceware.org (Postfix) with ESMTPS id 8345D3858407 for ; Thu, 4 Aug 2022 14:51:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8345D3858407 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gotplt.org 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 5EB845A1FF1; Thu, 4 Aug 2022 14:51:25 +0000 (UTC) Received: from pdx1-sub0-mail-a304.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id EC6405A0704; Thu, 4 Aug 2022 14:51:24 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1659624685; a=rsa-sha256; cv=none; b=phrQoUB4AF+859YwR3c+wICaIdKDOeOSMBLtE9d/6ZNhu0crTV8DguXcw0y8hZ/zqv3GDS oNdXcs36jH+G1d8oDkvt/2XOqLO1n/PctmOgQLGqUZuyoypD/t+89iej/dv/e2msNC7eK2 cH0sdeOI3vGvvvd3OtrlpxkyZ/R7+90nYbonnq9ojevQEDCetPu6uhXCBTEPC9h7+dMZKn +73rboV8+/D2LSZep7p3H3VaOY1P3UWKI1EMPtJNAAhevjs+3koAxGm51zL2ng8PCYQjNs jIYP0+f5ygbu0OxsV3ankdtSVw7yXdrotMYdDtpeQz5goV57Xe93ujDoFU1Xpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1659624685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=HokhNh27LcIvobxpOOMTyfe+TmcBOKeliOBvBXuXT8U=; b=hP1wub0XIzqjezthpUKc+5tT9rQslyTVN0coIkKLavt5T+QMS42lm4ivQZk9SxpToV4ViQ 0898dRKzrE5aBrCD4CQfsoQdkpF9wEy+y+h/qfxwlecXejXIhCkk6xRIV0SZu9sBWLihXS qxDxHxmIUXulbSkcH8vc/q0QRTT+9V1LAiAfdBjoT8lE0ODXxU0RgRqUWJlXk3KfBauJF4 VXkcGWGh2JktBelASGR3pZccf2zdKW6f0wywCJo9qq6Cx14jYRtnNcmfq3iL2Hx64wWzNw wL3oVc4oCoRFhUpM9mwGE3TjdTtJK5sUSNU3l3NEdEjR71G+Rsj7hf3KbW0Qbg== ARC-Authentication-Results: i=1; rspamd-7586b5656-zrkhz; auth=pass smtp.auth=dreamhost smtp.mailfrom=siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Obese-Tangy: 6e24df9e4579fb53_1659624685218_4219596198 X-MC-Loop-Signature: 1659624685218:2716330700 X-MC-Ingress-Time: 1659624685217 Received: from pdx1-sub0-mail-a304.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.98.242.243 (trex/6.7.1); Thu, 04 Aug 2022 14:51:25 +0000 Received: from [192.168.176.119] (unknown [24.114.73.53]) (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-a304.dreamhost.com (Postfix) with ESMTPSA id 4LzBWJ2S7hzTM; Thu, 4 Aug 2022 07:51:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gotplt.org; s=dreamhost; t=1659624684; bh=HokhNh27LcIvobxpOOMTyfe+TmcBOKeliOBvBXuXT8U=; h=Date:Subject:To:From:Content-Type:Content-Transfer-Encoding; b=WSeJYHOqTA/it3fJpDVCgJf9v8B/Ef80tHpuc4HnDHy88HcOw/RBn+l873cbSgSmz 3AaQYN0i3pN2SXGlwTCkZsdsspNd/wntdcNM4oiLbQ5iLaLKbI6GUZ3iPwx5m6TB6/ Yh8gSeHAzx0Ng6IRqmy0F1fLq87UdYNOMZoDTNMQwP8/+NOhKbet7PiHm8/xXH7sSj Xsn0oKSI1onLODBYP5B8N1SNmZBOa4uz6zZ9DhMpGzgCSriof4nON+btGFwQC6Mqt9 BiQiXeVWFAGwYNZqpFEQ40uH7DEq72b0aKCLNuu+q+C/AT+HHGrwVWw3CSjQwihWZh tYiM4F70AwZDQ== Message-ID: <9ddb2422-47f5-ba9a-e7a3-d9522d80719a@gotplt.org> Date: Thu, 4 Aug 2022 10:51:22 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] malloc: Correct the documentation of the top_pad default Content-Language: en-US To: Florian Weimer , libc-alpha@sourceware.org References: <87wnbojswh.fsf@oldenburg.str.redhat.com> From: Siddhesh Poyarekar In-Reply-To: <87wnbojswh.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3038.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, 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 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: Thu, 04 Aug 2022 14:51:29 -0000 On 2022-08-04 04:48, Florian Weimer via Libc-alpha wrote: > DEFAULT_TOP_PAD is defined as 131072 in > sysdeps/generic/malloc-machine.h. LGTM, but I wonder if we should tighten this so that it doesn't appear that DEFAULT_TOP_PAD could be 0 in any of our build configurations. e.g. we could replace the definition with a #error "define DEFAULT_TOP_PAD" or something like that to ensure that it's always defined through malloc-machine.h. What do you think? Thanks, Sid > > --- > elf/dl-tunables.list | 1 + > elf/tst-rtld-list-tunables.exp | 2 +- > manual/tunables.texi | 2 +- > 3 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/elf/dl-tunables.list b/elf/dl-tunables.list > index e6a56b3070..e925590c36 100644 > --- a/elf/dl-tunables.list > +++ b/elf/dl-tunables.list > @@ -42,6 +42,7 @@ glibc { > type: SIZE_T > env_alias: MALLOC_TOP_PAD_ > security_level: SXID_IGNORE > + default: 131072 > } > perturb { > type: INT_32 > diff --git a/elf/tst-rtld-list-tunables.exp b/elf/tst-rtld-list-tunables.exp > index cdfdb56a94..2233ea9c7c 100644 > --- a/elf/tst-rtld-list-tunables.exp > +++ b/elf/tst-rtld-list-tunables.exp > @@ -9,7 +9,7 @@ glibc.malloc.perturb: 0 (min: 0, max: 255) > glibc.malloc.tcache_count: 0x0 (min: 0x0, max: 0x[f]+) > glibc.malloc.tcache_max: 0x0 (min: 0x0, max: 0x[f]+) > glibc.malloc.tcache_unsorted_limit: 0x0 (min: 0x0, max: 0x[f]+) > -glibc.malloc.top_pad: 0x0 (min: 0x0, max: 0x[f]+) > +glibc.malloc.top_pad: 0x20000 (min: 0x0, max: 0x[f]+) > glibc.malloc.trim_threshold: 0x0 (min: 0x0, max: 0x[f]+) > glibc.rtld.dynamic_sort: 2 (min: 1, max: 2) > glibc.rtld.nns: 0x4 (min: 0x1, max: 0x10) > diff --git a/manual/tunables.texi b/manual/tunables.texi > index 83cdcdac6d..ffd50a3fe2 100644 > --- a/manual/tunables.texi > +++ b/manual/tunables.texi > @@ -143,7 +143,7 @@ number of bytes to retain when shrinking any of the arenas. This provides the > necessary hysteresis in heap size such that excessive amounts of system calls > can be avoided. > > -The default value of this tunable is @samp{0}. > +The default value of this tunable is @samp{131072} (128 KB). > @end deftp > > @deftp Tunable glibc.malloc.perturb >