From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by sourceware.org (Postfix) with ESMTPS id 19B303858D35; Wed, 4 Jan 2023 23:49:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 19B303858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-x102d.google.com with SMTP id fz16-20020a17090b025000b002269d6c2d83so2363656pjb.0; Wed, 04 Jan 2023 15:49:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=yPuctGpOxZUEYjZLr5ACP1MmihncOqaDijH0Z85z7vU=; b=k+35VU7J0s6hBUVI4b8wAZjLZY91F9PiEBxKGX0Pnbbxfzudo/MIpNCMKF/7nnlQdI 0jHgNvNPBuwVZea5KvfjoIihatkD06S10rS6ecF2FDGoPNBe64QJ6NmmZy8zBHbWCS+v VP7vB9ARBAzGT2PGf86tWBLMO3vmUkjmukTp7RwxZwWrbCM9ZZmGWMMwNRhVCS73yOkM C3kSL66Zd07D4o9Cf6VHJA4Mlsw/+jYUMQqbbwNJjtu7Eoid0/5sX0i262LB/R37HZrW DOgokPusMJcPyKOw9tb9WUZlUyQnNDgR7+vaXYx2CjsY7DtSbtzZ6aVMqbyc7HpFeXOE v92g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yPuctGpOxZUEYjZLr5ACP1MmihncOqaDijH0Z85z7vU=; b=FbsiOz+4mYgcxLYX61clax/elckaCb6KbALHXzmamzsSDUr6+fJMXmQE3+Vb0qUGKx CULJsGedwj0Tb00eMsDC8OunYSdUCJXenepnVQ+OiFAaRhgyFQB6K4h7PHdHXwLJwXSg v12RN1SLXNl9c2KsX0da3u4IehG88010h/gkmC46BIZg1tbs3imymVji6jagiN/KNHFq 8F2jk0mS1l/9+Ec8Vvi2Zf7iJZpOWh0l9+ZyTZxq0T8HVEEhv6QOaw1Fqy/Ql89RvjDq 20lSEPGhCPQ+ca9zyapCVpmIbiNKKc/dEnAojJFex8HQcXXPRCdvVg2y3s6cdN8eM826 RkjQ== X-Gm-Message-State: AFqh2koe9081wW3j3czHIFGuoUpPbHWl8PUJlSzJHJHtjPWnW0oCvAhz 5g9NJDk88dplLR8WX1gc3sxgiNfJNgQ= X-Google-Smtp-Source: AMrXdXtAcRzN/P1hTSCY8pMfpX+ht1Dh2dDIgXGrX5zTPJxE8NcLqb/3azk9jsqfAeTZ8p6piNOddg== X-Received: by 2002:a17:90b:268c:b0:225:c26d:4c52 with SMTP id pl12-20020a17090b268c00b00225c26d4c52mr47466546pjb.48.1672876150776; Wed, 04 Jan 2023 15:49:10 -0800 (PST) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id 30-20020a17090a191e00b00218fb3bec27sm84566pjg.56.2023.01.04.15.49.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Jan 2023 15:49:09 -0800 (PST) Message-ID: Date: Wed, 4 Jan 2023 16:49:08 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH] Add _FORTIFY_SOURCE implementation documentation [BZ #28998] Content-Language: en-US To: Siddhesh Poyarekar , Sam James Cc: libc-alpha@sourceware.org, fweimer@redhat.com References: <20221215162506.1802077-1-siddhesh@sourceware.org> <6E441F3E-97B4-4A4E-B876-618D12EEDCF4@gentoo.org> <4b05d5c5-b418-4dcc-0aa9-a02cb6000d73@sourceware.org> From: Jeff Law In-Reply-To: <4b05d5c5-b418-4dcc-0aa9-a02cb6000d73@sourceware.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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 List-Id: On 1/3/23 07:43, Siddhesh Poyarekar via Libc-alpha wrote: > On 2022-12-22 08:08, Sam James wrote: >> >> >>> On 22 Dec 2022, at 12:56, Siddhesh Poyarekar >>> wrote: >>> >>> Ping!  Any further comments other than the redundant 'See' Andreas >>> noted? >>> >> >> It looks good & thanks for doing it. >> >> I wonder if it's worth noting (maybe it's obvious) that tools which >> make use of LD_PRELOAD may need to provide their own wrappers. >> >> (umockdev being an example I'm thinking of here.) > > Hi Sam, sorry I missed your response (and funnily, I got 3 of them!). > > I'm not sure, there are other issues with interposing, e.g. string > function calls where the result is already dependent on how the compiler > treats those calls, making the result of the interposition kinda > indeterminate across builds.  So I don't know how useful it would be to > call it out specifically in the context of _FORTIFY_SOURCE.  However, I > don't think it's a bad idea to do so either (i.e. I don't see it > imposing any constraints on us as implementers), so if you like it (and > others don't express a dislike), I'll be happy to add a note in there. Right. In general the compiler may replace a variety of library calls with inline versions. The set of calls subject to this behavior isn't stable across compiler versions, targets or even across different call sites as the call site context may affect if the compiler thinks inlining is profitable or not. jeff