From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 8C422385BF9B for ; Fri, 2 Jul 2021 19:56:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8C422385BF9B Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 162JYghl126206; Fri, 2 Jul 2021 15:56:55 -0400 Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0b-001b2d01.pphosted.com with ESMTP id 39j5hv5hv1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 02 Jul 2021 15:56:54 -0400 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 162JpgOv008680; Fri, 2 Jul 2021 19:56:54 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma04wdc.us.ibm.com with ESMTP id 39duvf4hsp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 02 Jul 2021 19:56:54 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 162Jureu40960336 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 2 Jul 2021 19:56:53 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A4E26AE01C; Fri, 2 Jul 2021 19:56:53 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 682E5AE012; Fri, 2 Jul 2021 19:56:53 +0000 (GMT) Received: from [9.160.138.177] (unknown [9.160.138.177]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 2 Jul 2021 19:56:53 +0000 (GMT) Subject: Re: [PATCH] powerpc64: Remove strcspn ifunc from the loader To: Tulio Magno Quites Machado Filho , libc-alpha@sourceware.org Cc: Anton Blanchard References: <20210702193223.37956-1-tuliom@linux.ibm.com> From: Paul E Murphy Message-ID: <370db34c-99aa-2c2f-112e-74dc716c5041@linux.ibm.com> Date: Fri, 2 Jul 2021 14:56:53 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 In-Reply-To: <20210702193223.37956-1-tuliom@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: HmXXeGxu3bgzsVlEEHPkFKK2q2CfT5Rm X-Proofpoint-GUID: HmXXeGxu3bgzsVlEEHPkFKK2q2CfT5Rm Content-Transfer-Encoding: 7bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-02_09:2021-07-02, 2021-07-02 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxscore=0 bulkscore=0 malwarescore=0 adultscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 clxscore=1011 suspectscore=0 priorityscore=1501 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107020100 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, NICE_REPLY_A, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Fri, 02 Jul 2021 19:56:59 -0000 On 7/2/21 2:32 PM, Tulio Magno Quites Machado Filho via Libc-alpha wrote: > 5 years ago, commit 8f1b841e452dbb083112fd036033b7f4af506ba0 > unintentionally added an ifunc to the loader. > That modification has not caused any harm so far, but it doesn't add any > value either, because the hwcap information is available later during > libc initialization. Oh, oops. Thanks for fixing this! > Suggested-by: Anton Blanchard > --- > .../powerpc/powerpc64/multiarch/rtld-strcspn.c | 18 ++++++++++++++++++ > sysdeps/powerpc/powerpc64/multiarch/strcspn.c | 2 ++ > 2 files changed, 20 insertions(+) > create mode 100644 sysdeps/powerpc/powerpc64/multiarch/rtld-strcspn.c > > diff --git a/sysdeps/powerpc/powerpc64/multiarch/rtld-strcspn.c b/sysdeps/powerpc/powerpc64/multiarch/rtld-strcspn.c > new file mode 100644 > index 0000000000..fcb9682e58 > --- /dev/null > +++ b/sysdeps/powerpc/powerpc64/multiarch/rtld-strcspn.c > @@ -0,0 +1,18 @@ > +/* Copyright (C) 2021 Free Software Foundation, Inc. > + This file is part of the GNU C Library. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library; if not, see > + . */ > + > +#include > diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcspn.c b/sysdeps/powerpc/powerpc64/multiarch/strcspn.c > index 683aa104d7..bb4d54620f 100644 > --- a/sysdeps/powerpc/powerpc64/multiarch/strcspn.c > +++ b/sysdeps/powerpc/powerpc64/multiarch/strcspn.c > @@ -16,6 +16,7 @@ > License along with the GNU C Library; if not, see > . */ > > +#if IS_IN (libc) > #include > #include > #include "init-arch.h" > @@ -33,3 +34,4 @@ libc_ifunc (__libc_strcspn, > > weak_alias (__libc_strcspn, strcspn) > libc_hidden_builtin_def (strcspn) > +#endif Is the macro guard needed if you're directly bypassing via rtld-strcspn.c above? Otherwise, LGTM either way.