From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 0020A3858D3C for ; Fri, 2 Dec 2022 05:01:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0020A3858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Content-Type: multipart/signed; boundary="Apple-Mail=_469C81FB-E73B-44DC-ACFF-9F3D2A17FC1B"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.200.110.1.12\)) Subject: Re: [RFC] Supporting malloc_usable_size From: Sam James In-Reply-To: Date: Fri, 2 Dec 2022 05:00:45 +0000 Cc: Siddhesh Poyarekar , libc-alpha@sourceware.org Message-Id: <8E77ABD5-E885-4239-B6E6-A956B49BD6AC@gentoo.org> References: To: DJ Delorie X-Mailer: Apple Mail (2.3731.200.110.1.12) X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --Apple-Mail=_469C81FB-E73B-44DC-ACFF-9F3D2A17FC1B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 2 Dec 2022, at 04:42, DJ Delorie via Libc-alpha = wrote: >=20 > [snip] >> The larger consequence of this patch though is that we further = support >> the usage of malloc_usable_size for cases beyond diagnostics. Do we >> want to do that? >=20 > To what extend do we support it *at all*, other than "it returns the > right number at the time it was called" ? Right. It's still not clear to me if glibc is actually interested in = supporting the use case here. If it isn't, it should be stated clearly so it's = clear who is to blame when FORTIFY_SOURCE=3D3 complains. (And it's also unclear to me that it should be supported, either.) >=20 >> If we do, should we also then make clear what kind of usage we = support >> as a library, say, in the manual? >=20 > Our man page already says "The main use of this function is for > debugging and introspection". The BSD manual says "The > malloc_usable_size() function is not a mechanism for in-place = realloc(); > rather it is provided solely as a tool for introspection purposes." >=20 My guess is the systemd maintainers currently rely on a specific = interpretation of "introspection" which may not align with glibc's. --Apple-Mail=_469C81FB-E73B-44DC-ACFF-9F3D2A17FC1B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iNUEARYKAH0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCY4mGfl8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R kManAQCCOlpH+6bDVRFjDVk0IgM4/URSg+8vudk/NKikiEXd+gD+ImFsrgaLJvaE QxKRkerId5hUMjJJumh+taX4/ucoQw4= =JbJE -----END PGP SIGNATURE----- --Apple-Mail=_469C81FB-E73B-44DC-ACFF-9F3D2A17FC1B--