From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-3.6 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, PDS_RDNS_DYNAMIC_FP,RCVD_IN_DNSWL_MED,RDNS_DYNAMIC,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 876E01F601 for ; Fri, 2 Dec 2022 05:01:29 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="QkmMGYTX"; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 52543385841E for ; Fri, 2 Dec 2022 05:01:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 52543385841E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669957288; bh=lHcfspRKevtqWhdKPB6k6leUOWUEku9vmalagLjDfcY=; h=Subject:In-Reply-To:Date:Cc:References:To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=QkmMGYTXvLo549Xuzi/7Rfwurkxo0xnQWy7loeVSE43J6dkSjMKfKVt6wyEw7Q9yD Ktus9gfioF3lf9Kvac/GNySRkIQTyStc5BHB1V1vFTaLbyVQUM2K0Rs2EGCvSRJfTa W3P3XGel5H4NvCdyJ64+AN+Ha0YxQmSNk6VopOg8= 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 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 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-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: , From: Sam James via Libc-alpha Reply-To: Sam James Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" --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--