From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from donkey.elm.relay.mailchannels.net (donkey.elm.relay.mailchannels.net [23.83.212.49]) by sourceware.org (Postfix) with ESMTPS id 52B023858D1E for ; Wed, 10 Aug 2022 14:29:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 52B023858D1E 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 6F3416C1621; Wed, 10 Aug 2022 14:29:23 +0000 (UTC) Received: from pdx1-sub0-mail-a305.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id CFC206C174E; Wed, 10 Aug 2022 14:29:22 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1660141762; a=rsa-sha256; cv=none; b=YtDE97SBo3Ryfw5T7bc73nvVD1YvUoFiMLrA1/2phKCXvY6tJe19EebtAQK6lY+1SV5qRp +XRlJwCjMucUxOxF1xoH1+MqdKAMLhfmRQSiSYJc16o6el2g6/jaFUlfV5f4tvDEmTZiZ0 GHTlC7lRJzECMrmYrapwzPpM2p03/hi4edDH6OJvVdWx49eAk2iYqeJrVdpKzNB7YkK1dI SJ+pqNg4sl5WsclCQfnKObPxp8SWF3prxVWo7FdDkY0PLJhWNnFpvzwMA6rBk7izxbA5+H EyoGP1Z8AmCDZIX1P2GmOgqjfbmqhjY3jajFSa/nn0vt9FgkoTNfm8WyjAYuzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1660141762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc: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=rRftbNd6PrMyRTKQ+f5Q2rwDmrpA1qozWtxjo9rJxSw=; b=1WseCoUIk885sUmeleYpg2R8TMuat4Th+wvGP25l5xkFSVrv9A2+iuxf70tjuX5OfrXPH6 ZXwJfzIrJLfVRTXAhGLLeXrATUyTfHSWKLj0jQsOExNf92rFHy1XlVGZxhVMMNxqYFGvkd XLJ55cTqOlC+afavhTZuj4z1G0aY2zB8x8/DWmpKb/Ki4Eh17biSfyVuUeUEgGuOahzKfT QamAcc5usGPINzMD1ICWuJ9FoyVKuGKSAz7YvppOGVk33BN3K5h3W+HGQNI1kZB0pFEH3A f4g8LK/MpK2s4q0EdHf21+PpqDh5twprfgKexv7doga3VaTjUjMIOTDeck/tow== ARC-Authentication-Results: i=1; rspamd-7c478d8c66-przzp; 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-Harmony-Language: 0c80bb04410b2a94_1660141763098_4291186533 X-MC-Loop-Signature: 1660141763098:3359772769 X-MC-Ingress-Time: 1660141763097 Received: from pdx1-sub0-mail-a305.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.110.28.208 (trex/6.7.1); Wed, 10 Aug 2022 14:29:23 +0000 Received: from [192.168.0.182] (bras-vprn-toroon4834w-lp130-16-184-147-84-238.dsl.bell.ca [184.147.84.238]) (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-a305.dreamhost.com (Postfix) with ESMTPSA id 4M2sl60PTZz21; Wed, 10 Aug 2022 07:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gotplt.org; s=dreamhost; t=1660141762; bh=rRftbNd6PrMyRTKQ+f5Q2rwDmrpA1qozWtxjo9rJxSw=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=T1SWOgsuzFrkvHnv7sXwEQWxpnT25A/yx+ZGoreFuYYbx7Sv82jhKI0lV0t9ZRiG/ Rfn9FmP4Sn930Im8wFxEiI4btc1G3l5lM7AhZrKDDS98TEwcvtLp1TLYQIX7u4c6LY vgfnDccYKC6OvUp3fOyG3yCZusvyRxZHYhVYcbOSOxmTA6DmExBbTGLrf2AwTUM8UW vmmZhRz2HCNjPcRUyig3dhjNL4IVbRUordo9yk3xvl6Bv6pRioGilwt0oNGPNtctIK we6jBpDQBsYM17QJIwzHQPPji1ClygQJyX/GdYwIgtGIIyRQXa9vf51hrftQAVH9rU 1Wp7j48Fr/5Eg== Message-ID: <59f7bd6f-8e8d-20d9-b59b-f8907b915cbc@gotplt.org> Date: Wed, 10 Aug 2022 10:29:20 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH] stdlib: tests: don't double-define _FORTIFY_SOURCE Content-Language: en-US To: Sam James Cc: libc-alpha@sourceware.org References: <20220805201358.2348750-1-sam@gentoo.org> <294385d7-3974-9089-e190-782bffd40af8@gotplt.org> <2C25DD11-565E-4ED7-A188-E935D1F43083@gentoo.org> From: Siddhesh Poyarekar In-Reply-To: <2C25DD11-565E-4ED7-A188-E935D1F43083@gentoo.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3031.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: Wed, 10 Aug 2022 14:29:28 -0000 On 2022-08-08 18:30, Sam James wrote: > This is a fair point, although I now see we've actually got libc_cv_predef_fortify_source > which sets CPPUNDEFS for exactly this sort of problem anyway. > > I don't see the warning with gcc-11 + -Werror + F_S=3 on a test program. I can build some > older GCCs as I should probably keep them around anyway though. Interesting, because you should have seen the warning about _FORTIFY_SOURCE=3 not being supported; I'm surprised that it doesn't fail due to that warning. >> Alternatively, some magic here to determine the maximum fortification level wouldn't hurt, but I won't gate your patch on that :) I can work on that bit. > > I started looking at that and I'm not sure there's a point. includes/features.h downgrades us appropriately. I think we can unconditionally > set F_S=3 if I'm right about GCC not caring, as all the logic is on the glibc side, right? It's the warning I'm thinking about avoiding. > > We can always split this into two if you want: > 1. The original commit (I can convert it to use libc_cv_predef_fortify_source's result) & backport it to 2.36 Sounds good to me. > 2. Another to crank to =3 and don't backport it in case I'm missing something. > Thanks, Sid