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 3FE9D3858030 for ; Tue, 18 Jan 2022 12:42:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3FE9D3858030 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 20IBsHoE030346 for ; Tue, 18 Jan 2022 12:42:31 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3dnt4dnarh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 18 Jan 2022 12:42:31 +0000 Received: from m0098414.ppops.net (m0098414.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 20ICLmkl022646 for ; Tue, 18 Jan 2022 12:42:31 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 3dnt4dnaqk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Jan 2022 12:42:31 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 20ICbcN5015906; Tue, 18 Jan 2022 12:42:29 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma04ams.nl.ibm.com with ESMTP id 3dknw949at-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Jan 2022 12:42:29 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 20ICgRvP42598660 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Jan 2022 12:42:27 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E136CA407B; Tue, 18 Jan 2022 12:42:26 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B75D6A404D; Tue, 18 Jan 2022 12:42:26 +0000 (GMT) Received: from [9.145.72.212] (unknown [9.145.72.212]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 18 Jan 2022 12:42:26 +0000 (GMT) Message-ID: <81a3cde1-250e-b04a-0037-4fb7f363fd42@linux.ibm.com> Date: Tue, 18 Jan 2022 13:42:26 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH 7/7] s390x: Use in early HWCAP check Content-Language: en-US To: Florian Weimer , libc-alpha@sourceware.org References: <201e517c6a751bebe505af99e35a9f8643066f31.1642162312.git.fweimer@redhat.com> From: Stefan Liebler In-Reply-To: <201e517c6a751bebe505af99e35a9f8643066f31.1642162312.git.fweimer@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 8B_6lzVVuJqxZhnm-M8PcpkdVD1TFj0n X-Proofpoint-GUID: 9X42ujxtTPamPI1pp4eoEPUpsNPVDoRe X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-18_03,2022-01-18_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 malwarescore=0 impostorscore=0 mlxlogscore=999 suspectscore=0 bulkscore=0 adultscore=0 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201180077 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, 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: Tue, 18 Jan 2022 12:42:33 -0000 On 14/01/2022 13:41, Florian Weimer wrote: > This is required so that the checks still work if $(early-cflags) > selects a different ISA level. > > --- > sysdeps/s390/s390-64/dl-hwcap-check.h | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/sysdeps/s390/s390-64/dl-hwcap-check.h b/sysdeps/s390/s390-64/dl-hwcap-check.h > index 53e02250b8..f769932325 100644 > --- a/sysdeps/s390/s390-64/dl-hwcap-check.h > +++ b/sysdeps/s390/s390-64/dl-hwcap-check.h > @@ -19,17 +19,18 @@ > #ifndef _DL_HWCAP_CHECK_H > #define _DL_HWCAP_CHECK_H > > +#include > #include > > static inline void > dl_hwcap_check (void) > { > #if defined __ARCH__ > -# if __ARCH__ >= 13 > +# if GCCMACRO__ARCH__ >= 13 > if (!(GLRO(dl_hwcap) & HWCAP_S390_VXRS_EXT2)) > _dl_fatal_printf ("\ > Fatal glibc error: CPU lacks VXRS_EXT2 support (z15 or later required)\n"); > -# elif __ARCH__ >= 12 > +# elif GCCMACRO__ARCH__ >= 12 > if (!(GLRO(dl_hwcap) & HWCAP_S390_VXE)) > _dl_fatal_printf ("\ > Fatal glibc error: CPU lacks VXE support (z14 or later required)\n"); Hi Florian, I'm not quite sure if all your patches are already committed. I've just give it a try with commit f8b765bec44e6c464a7eabf80e58c6851ca15ac3: - configure glibc with --with-rtld-early-cflags=-march=zEC12 and CFLAGS=-march=z15 on a z15. - Rebooted with novx-kernel-parameter => vector-related HWCAPs are disabled and executing vector-instructions leads to a crash - run a helloworld-program: crash due to vector-instruction in _dl_setup_hash, which is called in _dl_start_final before _dl_sysdep_start is called which runs dl_hwcap_check. I've checked the build-log and see that the following files are compiled with -march=zEC12: - dl-printf.c - ../sysdeps/unix/sysv/linux/dl-write.c - dl-tunables.c - ../sysdeps/unix/sysv/linux/dl-sysdep.c - rtld.c Bye Stefan