From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60074.outbound.protection.outlook.com [40.107.6.74]) by sourceware.org (Postfix) with ESMTPS id 553DD385E00B for ; Wed, 25 Mar 2020 18:38:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 553DD385E00B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Wilco.Dijkstra@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Uy154th6YpwxZg7dw/n9BeNdYV3SpLidDw5weW1uMT4=; b=rAHH53IVufqPQgwOg83nbAliHY0gGUdXTZQD8UvqCQZxzBl85Ur8Dod0f7ZU3w0P77VwsYHJr55R55H5bq995NqyogE9rVPqpshkdQ2TC7ywoE5h19vLPlaKSVnWVZt+0y7YgCqApbZe1VQS4KsQvkYe4cNtY+53LTOWyNk2yR8= Received: from VI1PR0801CA0071.eurprd08.prod.outlook.com (2603:10a6:800:7d::15) by DBBPR08MB5221.eurprd08.prod.outlook.com (2603:10a6:10:d8::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.20; Wed, 25 Mar 2020 18:37:59 +0000 Received: from VE1EUR03FT038.eop-EUR03.prod.protection.outlook.com (2603:10a6:800:7d:cafe::c5) by VI1PR0801CA0071.outlook.office365.com (2603:10a6:800:7d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.20 via Frontend Transport; Wed, 25 Mar 2020 18:37:59 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; sourceware.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT038.mail.protection.outlook.com (10.152.19.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.17 via Frontend Transport; Wed, 25 Mar 2020 18:37:58 +0000 Received: ("Tessian outbound e13acb17570e:v48"); Wed, 25 Mar 2020 18:37:58 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 28aed6c6fb043713 X-CR-MTA-TID: 64aa7808 Received: from 75b0c679e0f1.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id CEC7EE75-7593-4CAF-933A-C22D2362B0E9.1; Wed, 25 Mar 2020 18:37:53 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 75b0c679e0f1.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 25 Mar 2020 18:37:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RkahemL568uYb9vg9cepn2C+nSktDgUZ+ZqDnyIEsxuqXOUrVDIO3200P+1hTynPsHAztS9JYraFxA7ixe+FWBg3qQbgGh3EK+1DnnD2zn5jejvQ0yyhaadZbNT+c3koX3e5Ipl4r/CvqG7MLiQA/meMIOUinADTRz+Ey5DgjUHEbc+5E+eQ41MBchRLyuZOTh8PSSECI5jwOGkQcFgMPQ1Tg10sksJ4OY96x/pLgvjNJheD2g+Bew/2tUJiicBdwm1CsWIcPl4EJ5C+9vaghAq0Ht7m3THQbB2Ffd7NH8Acx3ssemjY6U44aEkhNQbDGY6fTnu9RRK7PLOv68VbQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Uy154th6YpwxZg7dw/n9BeNdYV3SpLidDw5weW1uMT4=; b=UfmPYPrRlqXft4zf7bo5EugTDcNa/Wg0HiT5nSI/h4UPZBYGlNHZI5W2ioOoq9sGuKHPVstqFDcrmi+dPIFlEfVWSy9iDdP493Ih5n20hLM0DaAtVJ//zTzHTTtLlBvtgyrBMditBDpfv3g/2NHMywjSlLO7krcpNB1NbEtLE+H+FGHKlaX1FvXnngDkXSpSAjxjUjBIWsb+cfpu2dsRy9lU3B6CBQlUlOsi540v+GCGKxVTJ4/T9WzSaEfXMnqYLQwesBQ4kxzQM4rmzyXco2nlEwsYVNQbea0q83BHyAkAFLvniLnWsT9URWOXNAMQH7JivVy+do3Odw/3OTebgQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Uy154th6YpwxZg7dw/n9BeNdYV3SpLidDw5weW1uMT4=; b=rAHH53IVufqPQgwOg83nbAliHY0gGUdXTZQD8UvqCQZxzBl85Ur8Dod0f7ZU3w0P77VwsYHJr55R55H5bq995NqyogE9rVPqpshkdQ2TC7ywoE5h19vLPlaKSVnWVZt+0y7YgCqApbZe1VQS4KsQvkYe4cNtY+53LTOWyNk2yR8= Received: from AM5PR0801MB2035.eurprd08.prod.outlook.com (10.168.157.147) by AM5PR0801MB2049.eurprd08.prod.outlook.com (10.168.153.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.19; Wed, 25 Mar 2020 18:37:52 +0000 Received: from AM5PR0801MB2035.eurprd08.prod.outlook.com ([fe80::19ff:5219:d351:3199]) by AM5PR0801MB2035.eurprd08.prod.outlook.com ([fe80::19ff:5219:d351:3199%3]) with mapi id 15.20.2835.023; Wed, 25 Mar 2020 18:37:52 +0000 From: Wilco Dijkstra To: "libc-stable@sourceware.org" Subject: [2.26 COMMITTED] aarch64: Remove HWCAP_CPUID from HWCAP_IMPORTANT Thread-Topic: [2.26 COMMITTED] aarch64: Remove HWCAP_CPUID from HWCAP_IMPORTANT Thread-Index: AQHWAgFnct4ent/G30G2+eytzgA4mw== Date: Wed, 25 Mar 2020 18:37:52 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; x-originating-ip: [82.24.199.97] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 58732652-32d8-4fb8-fd57-08d7d0eba460 x-ms-traffictypediagnostic: AM5PR0801MB2049:|DBBPR08MB5221: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:2512;OLM:10000; x-forefront-prvs: 0353563E2B X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(366004)(346002)(396003)(376002)(136003)(39860400002)(71200400001)(26005)(6916009)(8936002)(8676002)(186003)(2906002)(478600001)(64756008)(66556008)(66476007)(66446008)(66946007)(76116006)(86362001)(52536014)(55016002)(9686003)(33656002)(7696005)(6506007)(81156014)(81166006)(5660300002)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0801MB2049; H:AM5PR0801MB2035.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: UNTyVQn+15nF4WhZEhV3ViWTJZSj504edu0xcJEKkSAr9a3h91PgxgD7GFoVyVRYLwGhDyb5+Y60pTB8iqifLkzDbcriTsr72/fyeGmuWgGJ9Sz/erKTBaKbt0O6HdL7xRenmzaq0lawEqTPHfww3/79t0sIQsuwT0aDEfKWVgn73+EwPrjrwUH/xWa3igS2tbCP+cDlHuioGMEwdx00rpUUYHJvU1O7ty3HkOcGU2BF1kZJQMDgfhrX/ZNVsSUAPbvRbkwQycptB8lECb22TcNexWTqn9nfiAvMRRVlH8jU0x6yxTmGRejvoxW5vRVTcKoaAArFtiYPtMn3kVN5XUdUjh9M/ACtMuClJ8Md6erVAWAF1KDMMMwycEUUX2+ChhvajEv1DtOSI62CkCky4Q9F/TLoNbAMNf2xXW5f8tDmrPBt6A5bmzH2WDtVV2H6 x-ms-exchange-antispam-messagedata: Sr7XJoTXLndHDAFrjwHyuWKEoQ3FC4y6G0PZWmXDjGP2VoZkU/hbD5b1n6Dm1Ok+IwRzo39LZOxs1706IZMt1Ps+xMguVEqIfiKgUjoJwJhDthyDcD+pt7GlVs3v/xJABXhdc3qzIO2tAzxZ0Cz2bg== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB2049 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT038.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(346002)(136003)(39860400002)(396003)(376002)(46966005)(316002)(33656002)(8936002)(36906005)(52536014)(186003)(81156014)(82740400003)(81166006)(70586007)(8676002)(6916009)(86362001)(47076004)(5660300002)(6506007)(7696005)(2906002)(26005)(26826003)(478600001)(9686003)(356004)(55016002)(336012)(70206006); DIR:OUT; SFP:1101; SCL:1; SRVR:DBBPR08MB5221; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:Pass; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; X-MS-Office365-Filtering-Correlation-Id-Prvs: b8564ea2-b3f0-4966-0460-08d7d0eba0a1 X-Forefront-PRVS: 0353563E2B X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ne+ApcJZ6ONLPeIauW6Rcsd+we9BUokAeZ8C02RB2zcGnjiMMIhB/C8n4BKFclIIXut2cuRKjX7e0ReAC/My0TjGFPT+7k5O5god15C/oAq0YKpyYHQVZRdB6TFZ5+lAFnvqUmpkbHBmj6U6YG8VG1cj39UIxtM/AoCUxDmmSvXeRTDY54PJtx8BuQZ8x+dlh7nC0r2iyF6QJIR4K7HYaec9Uu+Mrfi1xiLouFc4EVYK8V04qMmuqxXO1C4u4I4vo41SfLO3/6i2ykF1Lbctr0k8PEMsHJcS/5fUNPAn6FSrwgMBjhj1wlhUzzX80GEQYFBg/5oH6ffG/QoHD8Jpxc5nxortcKYp9wAtYXoK8gQ4WgtLST0DOadEvXY8Npfq0FqFrCqCfGMT3icEFWtqX0RVcYeKECCARhbvDEMCbvwoMNGZ/U5YIwJjrzmTHQufBRWcEjfsK7j2TALQZmVLdxiHC3F83wy4V7IR/PnKce9OHln4fMoKw/19zXLbM1kyQjPzptagPU6LRxtMBo09OQ== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2020 18:37:58.8935 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 58732652-32d8-4fb8-fd57-08d7d0eba460 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB5221 X-Spam-Status: No, score=-31.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY, UNSUBSCRIBE_BODY autolearn=ham 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-stable@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-stable mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 18:38:03 -0000 This partially reverts commit f82e9672ad89ea1ef40bbe1af71478e255e87c5e Author: Siddhesh Poyarekar aarch64: Allow overriding HWCAP_CPUID feature check using HWCAP_MASK The idea was to make it possible to disable cpuid based ifunc resolution in glibc by changing the hwcap mask which the user could already control. However the hwcap mask has an orthogonal role: it specifies additional library search paths for the dynamic linker. So "cpuid" got added to the search paths when it was set in the default mask (HWCAP_IMPORTANT), which is not useful behaviour, the hwcap masking should not be reused in the cpu features code. Meanwhile there is a tunable to set the cpu explicitly so it is possible to disable the cpuid based dispatch without using a hwcap mask: GLIBC_TUNABLES=3Dglibc.tune.cpu=3Dgeneric * sysdeps/unix/sysv/linux/aarch64/cpu-features.c (init_cpu_features= ): Use dl_hwcap without masking. * sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h (HWCAP_IMPORTANT): Remove HWCAP_CPUID. (cherry picked from commit d0cd79807157e399ff58e67cb51651f90442122e) --- ChangeLog | 7 +++++++ sysdeps/unix/sysv/linux/aarch64/cpu-features.c | 5 +---- sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h | 5 ++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5f3df32..732e89d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2018-07-06 Szabolcs Nagy + + * sysdeps/unix/sysv/linux/aarch64/cpu-features.c (init_cpu_features= ): + Use dl_hwcap without masking. + * sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h (HWCAP_IMPORTANT): + Remove HWCAP_CPUID. + 2019-09-13 Wilco Dijkstra * string/memmem.c (__memmem): Rewrite to improve performance. diff --git a/sysdeps/unix/sysv/linux/aarch64/cpu-features.c b/sysdeps/unix/= sysv/linux/aarch64/cpu-features.c index 50297bc..e71d636 100644 --- a/sysdeps/unix/sysv/linux/aarch64/cpu-features.c +++ b/sysdeps/unix/sysv/linux/aarch64/cpu-features.c @@ -48,9 +48,6 @@ get_midr_from_mcpu (const char *mcpu) static inline void init_cpu_features (struct cpu_features *cpu_features) { - uint64_t hwcap_mask =3D GET_HWCAP_MASK(); - uint64_t hwcap =3D GLRO (dl_hwcap) & hwcap_mask; - register uint64_t midr =3D UINT64_MAX; #if HAVE_TUNABLES @@ -64,7 +61,7 @@ init_cpu_features (struct cpu_features *cpu_features) allows it. */ if (midr =3D=3D UINT64_MAX) { - if (hwcap & HWCAP_CPUID) + if (GLRO (dl_hwcap) & HWCAP_CPUID) asm volatile ("mrs %0, midr_el1" : "=3Dr"(midr)); else midr =3D 0; diff --git a/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h b/sysdeps/unix/s= ysv/linux/aarch64/dl-procinfo.h index 0333a18..63bdf75 100644 --- a/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h +++ b/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h @@ -33,9 +33,8 @@ /* Offset of the last bit allocated in HWCAP. */ #define _DL_HWCAP_LAST 15 -/* HWCAP_CPUID should be available by default to influence IFUNC as well a= s - library search. */ -#define HWCAP_IMPORTANT HWCAP_CPUID +/* No additional library search paths. */ +#define HWCAP_IMPORTANT 0 static inline const char * __attribute__ ((unused)) -- 2.7.4 IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.