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.133.124]) by sourceware.org (Postfix) with ESMTPS id 6ACE4385840C for ; Mon, 13 Dec 2021 11:59:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6ACE4385840C Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-376-om4hZHpPPJ6k7SBpXcovEg-1; Mon, 13 Dec 2021 06:59:54 -0500 X-MC-Unique: om4hZHpPPJ6k7SBpXcovEg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A812F1006AA0; Mon, 13 Dec 2021 11:59:52 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.17.223]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B02D01000180; Mon, 13 Dec 2021 11:59:50 +0000 (UTC) From: Florian Weimer To: Szabolcs Nagy Cc: Rongwei Wang , libc-alpha@sourceware.org, hjl.tools@gmail.com, adhemerval.zanella@linaro.org, xuyu@linux.alibaba.com, gavin.dg@linux.alibaba.com Subject: Re: [PATCH v6 1/2] elf: Properly align PT_LOAD segments [BZ #28676] References: <20211204045848.71105-1-rongwei.wang@linux.alibaba.com> <20211213025103.48472-1-rongwei.wang@linux.alibaba.com> <20211213025103.48472-2-rongwei.wang@linux.alibaba.com> <20211213110522.GT3294453@arm.com> <87sfuw21qi.fsf@oldenburg.str.redhat.com> <20211213113554.GU3294453@arm.com> Date: Mon, 13 Dec 2021 12:59:47 +0100 In-Reply-To: <20211213113554.GU3294453@arm.com> (Szabolcs Nagy's message of "Mon, 13 Dec 2021 11:35:54 +0000") Message-ID: <87bl1k1zrg.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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: Mon, 13 Dec 2021 11:59:58 -0000 * Szabolcs Nagy: >> What are the p_align values of the involved objects? I would not expect >> any changes on 32-bit Arm because p_align and the run-time page size >> should match there. > > p_align is 64K > > and i see a lot of close to 64K PROT_NONE mappings > left behind after many dlclose which creates a lot of > vm fragmentation when dlopen/dlclose is called in a loop. > > (i think the mapping is at the beginning or end of > the lib as some kind of padding and left behind after > dlclose, but haven't confirmed this yet) Oh. So why there is a real bug here, I think we need to discuss what the change means for 64K p_align binaries on 4K kernels. Do the additional munmap calls matter for startup performance? (I understand this is very much a correctness fix, but startup performance matters as well.) Thanks, Florian