From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dragonfly.ash.relay.mailchannels.net (dragonfly.ash.relay.mailchannels.net [23.83.222.51]) by sourceware.org (Postfix) with ESMTPS id 567A23854C74 for ; Fri, 28 Jul 2023 19:01:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 567A23854C74 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 8DB30C1544; Fri, 28 Jul 2023 19:01:14 +0000 (UTC) Received: from pdx1-sub0-mail-a232.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id C2A08C1EF7; Fri, 28 Jul 2023 19:01:13 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1690570873; a=rsa-sha256; cv=none; b=76iDt9YapmFDfGNXbpBkebAVnXJMQtXbdKgW5McZSUEFhLCSRrsSnU1yN5E+dvbWW9yKqV Bbqy03vuCxKqPjmK4ZQ1JuAUXWAkvu0HLZDci7ZPoAXpcSm9ah48/sdfD98IPeGVGocSQ3 zWTssDFBArgKmzoS0FnB7oS3AMI09cee70ScvrenzBC2S2ZPR5vOEsrKNvSLVaq+sxJUoh 4DnIx409AujOlIzysYAK2UWogJ1Q+bpNI6buUM7QVTA+8CQZhckUd/EaLzZft5fHPt+mmj yv9ckmAHAcJH6F3x60SSZOXo3WLL5GZ89x6ZHX3ASJ3KjIF0SyrPu9tdX3kCxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1690570873; 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=ICYt4KYV3Z8ygE7VQfKDc9dtDIRKo1qJ+7uTNbOxEBw=; b=1Q7e/tsidPLEsUpUxFcHl0E9/RuiaeukUC8/kKJl/3tlCTAN+Hoiza6nDbmXng/zwnIJbz lIhDFS8TjvDPXwQQyidS5D7pVSfj0QaVqM1wm8x4jLZKTkd0sSrtWaNjEUM39mTmTLMA4b 1EIG7yvBsgM6+WkFBNOdBgIj+gEyoWcVscxcNInRKIPwitheL+tklfv05dL0fMsBQpw/Rm DOoZQU13ncwptY8znV/CTJX3RJmQyxzmdeN/TsJa3Buycc0A29gqa0CXi+8y8b7kDmjAsH cVDnyLCzkWde8mF58rm2taXeQgemceIX4hm2tbLlLuKK8eQ33nAof42vQxdtKw== ARC-Authentication-Results: i=1; rspamd-d58c88954-s4gkr; 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-Towering-Invention: 31cfe7122cb453fd_1690570874386_620587904 X-MC-Loop-Signature: 1690570874386:3939447776 X-MC-Ingress-Time: 1690570874386 Received: from pdx1-sub0-mail-a232.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.107.249.135 (trex/6.9.1); Fri, 28 Jul 2023 19:01:14 +0000 Received: from [192.168.6.119] (unknown [24.114.68.196]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a232.dreamhost.com (Postfix) with ESMTPSA id 4RCH6J6Rt2z1t; Fri, 28 Jul 2023 12:01:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gotplt.org; s=dreamhost; t=1690570873; bh=ICYt4KYV3Z8ygE7VQfKDc9dtDIRKo1qJ+7uTNbOxEBw=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=aIyWKMcR/fo7iMTO7d/P7yu64kVFam4c5Esg28wmGm97BANk2AuBrs2aO2TsfPftF 8GLhh11IjUx3sQUJppQyC4W6WpLnZzfwSjpArlaTFNtosAJBOhc7sL4Rqw3AeeMIek UK9lcyNLbM3Kb3Z+EKUL2CxE/cZThwLwOY0/p4ZfSde8G2MZO6Pt34F6Iva9nBMpMF ulTgFIndAvccvrfUkt7RP5XZwED56dH/g1CXMlvA3l4rsMObK1ncuprCrhOmsKOj+H 2r+lqAW5TTTwSTqRfKgkmWXkZglTVxR5QG5M9c+XaQFaEyro/2Cat3s7vzf5uLVhS7 qZQ0tKpM4acRA== Message-ID: <70820b4a-f2b4-f85c-315e-5f1fcfd12d1b@gotplt.org> Date: Fri, 28 Jul 2023 15:01:10 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] stdlib: Improve tst-realpath compatibility with source fortification Content-Language: en-US To: Florian Weimer , libc-alpha@sourceware.org Cc: Carlos O'Donell , Frederic Berat References: <87y1j0w47p.fsf@oldenburg3.str.redhat.com> From: Siddhesh Poyarekar In-Reply-To: <87y1j0w47p.fsf@oldenburg3.str.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3037.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,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 List-Id: On 2023-07-28 09:33, Florian Weimer via Libc-alpha wrote: > On GCC before 11, IPA can make the fortified realpath aware that the > buffer size is not large enough (8 bytes instead of PATH_MAX bytes). > Fix this by using a buffer that is large enough. > > Tested with GCC 8 and GCC 11 on x86_64-linux-gnu with and without > fortification. Built with build-many-glibcs.py. This probably should > not be part of the upcoming release because it's just a test failure, it > does not even break the test build. LGTM. Reviewed-by: Siddhesh Poyarekar > --- > stdlib/tst-realpath.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/stdlib/tst-realpath.c b/stdlib/tst-realpath.c > index f325c95a44..3694ecd8af 100644 > --- a/stdlib/tst-realpath.c > +++ b/stdlib/tst-realpath.c > @@ -24,6 +24,7 @@ > License along with the GNU C Library; if not, see > . */ > > +#include > #include > #include > #include > @@ -50,7 +51,11 @@ void dealloc (void *p) > > char* alloc (void) > { > - return (char *)malloc (8); > +#ifdef PATH_MAX > + return (char *)malloc (PATH_MAX); > +#else > + return (char *)malloc (4096); > +#endif > } > > static int > > base-commit: 14126ff059e98e9236633741fd323a1116299872 >