From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 68CFD398D063 for ; Wed, 12 May 2021 14:50:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 68CFD398D063 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 14CEXMcY097398 for ; Wed, 12 May 2021 10:50:30 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 38ggvtrgeu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 May 2021 10:50:30 -0400 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 14CEY3YA103725 for ; Wed, 12 May 2021 10:50:30 -0400 Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com with ESMTP id 38ggvtrgdv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 May 2021 10:50:30 -0400 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 14CEc3RW001407; Wed, 12 May 2021 14:50:28 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma03wdc.us.ibm.com with ESMTP id 38dj99633j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 May 2021 14:50:28 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 14CEoRCV26018218 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 May 2021 14:50:27 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D1721C6063; Wed, 12 May 2021 14:50:27 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 589D0C605F; Wed, 12 May 2021 14:50:27 +0000 (GMT) Received: from localhost (unknown [9.85.179.12]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 12 May 2021 14:50:27 +0000 (GMT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <87im3owe4q.fsf@oldenburg.str.redhat.com> References: <162076753769.316372.10532385586864995177@fedora.local> <87im3owe4q.fsf@oldenburg.str.redhat.com> Subject: Re: [PATCH 2/3] powerpc64le: Check HWCAP bits against compiler build flags From: "Lucas A. M. Magalhaes" Cc: libc-alpha@sourceware.org To: Florian Weimer Date: Wed, 12 May 2021 11:50:23 -0300 Message-ID: <162083102385.352260.10700924656010868454@fedora.local> User-Agent: alot/0.9.1 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: KdNsSQffHjEiPIeEtTLqHosm9bjsgLw9 X-Proofpoint-ORIG-GUID: ABJcBt3fuIHVsUMoxZlSTYsw_PXYqq9c X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-05-12_07:2021-05-12, 2021-05-12 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 clxscore=1015 adultscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 spamscore=0 suspectscore=0 impostorscore=0 phishscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105120096 X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_BLACK autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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, 12 May 2021 14:50:32 -0000 Quoting Florian Weimer (2021-05-12 05:27:33) > * Lucas A. M. Magalhaes: >=20 > > Hi Florian. I've tested this patch on POWER[8..10] with -mcpu=3Dpower9 = and > > -mcpu=3Dpower10 built with GCC 10.3.1. > > > > When built with -mcpu=3Dpower10 I got a SIGILL on POWER8 and POWER10. >=20 > Do you mean POWER8 and POWER9? >=20 Yes. Sorry about that. > > For testing I'm just running ./libc.so. I try to inspect it with > > gdb. With -mcpu=3Dpower9 I can see it passing through dl_hwcap_check > > but not with -mcpu=3Dpower10. > > > > I maybe doing something wrong though. >=20 > I tried to allude in the commit message that this is expected. Maybe I > should drop the POWER10 check? >=20 Your commit message is fine, I misunderstood it. IMHO it's better to drop POWER10 check and add a comment explaining why it's not there. > I do not think this is fixable in the long term because I expect that > POWER10 builds won't need the bootstrap relocation in the dynamic loader > thanks to its PCREL instructions. (POWER10 should be > PI_STATIC_AND_HIDDEN.) We could disable POWER10 code for early parts of > the dynamic loader, but that will only work until we start to rely on > PI_STATIC_AND_HIDDEN, which has other benefits. I'm not familiar with this bootstrap relocation but for what I understood there is early code using PCREL instructions so it SIGILL before running this code, right? I don't oppose this change but still don't get why do we need this code? What's the benefit of the message instead of just SIGILL? --- Lucas A. M. Magalh=C3=A3es