From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from chocolate.larch.relay.mailchannels.net (chocolate.larch.relay.mailchannels.net [23.83.213.35]) by sourceware.org (Postfix) with ESMTPS id 44D92387102D for ; Fri, 30 Jun 2023 15:11:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 44D92387102D 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 9BDF53E0970; Fri, 30 Jun 2023 15:11:53 +0000 (UTC) Received: from pdx1-sub0-mail-a286.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 2C4C93E1128; Fri, 30 Jun 2023 15:11:53 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1688137913; a=rsa-sha256; cv=none; b=bN9KtrJTbKFaV1OoBgbw4/+REyS7ttvWE+3mAv/Hmr6xjZorwIDnlyRWhInPrMd757DnEi WQwDWAem4xQur9ebvWnfNxkjnVY+bgkVgQzd5GkeHUo1DxGRzqo7pgjpujtLoiI5C3khW5 G4HF/EY+0UIDwmoVYC5IqMJgIzskRCZUmT9KpSf16lh09oBPKYt7QcxIvT/k4H6FhMOdjv cWONJs2toVjy+qaOYM1UnGjdXT4H7rrkkSVd2x1VHkX5gTJq1IniPf22lG83rk9gnwCpO4 D7/GsMqbzGyPrwQYwo3QFDWPtDhWjTIrXGVN13itgDiUusS7ZKOtEc5gYRfrgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1688137913; 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=+Ky7knTRpEPT6bO/VVTt3r3bDsbOfk2T+umFLBEErEE=; b=OtGv/hMitPocvaHrYMWZ1/IdwJvgp3UvPHxhwORS7PA0JMOdkcyIGGLm1K5laeB4+s9K/7 c/3dwGmXYb+qQU1IjGw4nQ+D0kxWVe1kpEHPdFf04bOUQqV2JJLXrxR5h0XUPZdzsYFF3W ImWYrQkvWc5QBs/QvI1AZ9NukiHeIVSMNZZoosITZvL6+k+E5UO5IX7CPNIbu2n3HdWimx VTzQRREQ5fG69nyK8yNtAs8tIvjdXxatswN63tYWhQn6RTkdVGStCJ48JC3TGddFIomNC4 lWq+sGqtk9ECYlI/BTAdq8gCpL3vRq3npGe7U7D0qKzq6xfBkCTErgfPbooxcg== ARC-Authentication-Results: i=1; rspamd-85899d6fcc-k24th; auth=pass smtp.auth=dreamhost smtp.mailfrom=siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-MC-Relay: Good X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Scare-Stupid: 05fd14784a72e3de_1688137913434_3699703179 X-MC-Loop-Signature: 1688137913434:4019797186 X-MC-Ingress-Time: 1688137913434 Received: from pdx1-sub0-mail-a286.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.123.193.136 (trex/6.9.1); Fri, 30 Jun 2023 15:11:53 +0000 Received: from [192.168.0.182] (bras-vprn-toroon4834w-lp130-09-174-91-45-44.dsl.bell.ca [174.91.45.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a286.dreamhost.com (Postfix) with ESMTPSA id 4QszLc3TFdz7M; Fri, 30 Jun 2023 08:11:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gotplt.org; s=dreamhost; t=1688137912; bh=+Ky7knTRpEPT6bO/VVTt3r3bDsbOfk2T+umFLBEErEE=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=gOo7wof418hIdpKaSQ9KpGLm4JEk8Ib4Zx9QaFbxeStdPz3V17w4wt4vFIDMqeb9V D073b0gdobfrkltMWbmAwvWSm7HGmeyQB8x4T969sSoVXqo/9JS8urnLPBtXWezIvi C7WtkI3SBAFBQLDd1mKJ2mwjP93gIxM8t1bzbMFRpvOmGoYKzDbgNMEE4fCgBbQrtw NsrTLQGbqKFJJIRvooOyhWP96MkNxfgMjRbhlXY79IgkpIkn2s0CArMDOT/A0tWhZw QwwWPxdxACNhXxyE82BAz6rsUjV94znbVxtHZTo54d3xcMvzupUdoLKl8/2WwDbqnL TQ30ZchYB7Puw== Message-ID: <3944c634-1f67-1b67-d0fe-bd67238ecad1@gotplt.org> Date: Fri, 30 Jun 2023 11:11:51 -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 v3 06/16] asprintf_chk: Ensure compatibility for both s390x and ppc64le Content-Language: en-US To: =?UTF-8?B?RnLDqWTDqXJpYyBCw6lyYXQ=?= , libc-alpha@sourceware.org References: <20230628084246.778302-1-fberat@redhat.com> <20230628084246.778302-7-fberat@redhat.com> Cc: Stefan Liebler , Rajalakshmi Srinivasaraghavan From: Siddhesh Poyarekar In-Reply-To: <20230628084246.778302-7-fberat@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3036.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,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-06-28 04:42, Frédéric Bérat wrote: > If ldbl_* macros are used for asprintf, ABI gets broken on s390x, > if it isn't, ppc64le isn't building due to multiple asm redirections. > > This is due to the inclusion of bits/stdio-lbdl.h for ppc64le whereas it > isn't for s390x. This header creates redirections, which are not > compatible with the ones generated using libc_hidden_builtin_def. > Yet, we can't use libc_hidden_ldbl_proto on s390x since it will not > create a simple strong alias (e.g. as done on x86_64), but a versioned > alias, leading to ABI breakage. > --- Looks OK to me, but deferring to the IBM maintainers. Raji, Stefan, does this look right to you? Thanks, Sid > debug/asprintf_chk.c | 12 ++++++++++++ > include/stdio.h | 5 +++++ > 2 files changed, 17 insertions(+) > > diff --git a/debug/asprintf_chk.c b/debug/asprintf_chk.c > index 06d112de00..7da1cddacb 100644 > --- a/debug/asprintf_chk.c > +++ b/debug/asprintf_chk.c > @@ -36,5 +36,17 @@ ___asprintf_chk (char **result_ptr, int flag, const char *format, ...) > > return ret; > } > +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 > +/* This is needed since is included in this case, leading to > + * multiple asm redirection of the same symbol > + */ > ldbl_hidden_def (___asprintf_chk, __asprintf_chk) > ldbl_strong_alias (___asprintf_chk, __asprintf_chk) > +#else > +/* Yet, we can't use ldbl_* macros on some systems, even if they don't fall in > + * the first case as this leads to ABI breakage due to the long_double_symbol > + * aliasing, which is versionned. > + */ > +strong_alias (___asprintf_chk, __asprintf_chk) > +libc_hidden_builtin_def (__asprintf_chk) > +#endif > diff --git a/include/stdio.h b/include/stdio.h > index 3afb0ff77b..6755877911 100644 > --- a/include/stdio.h > +++ b/include/stdio.h > @@ -279,7 +279,12 @@ rtld_hidden_proto (__libc_fatal) > > libc_hidden_proto (__fgets_unlocked_chk) > > +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 > libc_hidden_ldbl_proto (__asprintf_chk) > +#else > +libc_hidden_proto (__asprintf_chk) > +#endif > + > libc_hidden_ldbl_proto (__fprintf_chk) > libc_hidden_ldbl_proto (__sprintf_chk) > libc_hidden_ldbl_proto (__vsprintf_chk)