From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2048.outbound.protection.outlook.com [40.107.21.48]) by sourceware.org (Postfix) with ESMTPS id C5E71385E01E for ; Wed, 25 Mar 2020 18:31:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C5E71385E01E 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=Ic2mTJU0Nk8YRuu2eCcvSjEg0CcDy98Q/CpnTj/GqtE=; b=wSeBy/jhOLFgE+HDGETB9bWGXDwoW/As24v2GV+bBitoMvjlSHI3bIPXc9rVXEirO0/orSoRQWa1SptmODZkUBUSQKjJUsAEdDDkNfRuE6vLg9SCRXTXp59mwyN05M8AnTVz6x1oRN3Wglw8RFztweA3XXhQ6rrj68fs+RPqXbg= Received: from DB8PR03CA0002.eurprd03.prod.outlook.com (2603:10a6:10:be::15) by VI1PR08MB3133.eurprd08.prod.outlook.com (2603:10a6:803:42::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.22; Wed, 25 Mar 2020 18:31:00 +0000 Received: from DB5EUR03FT056.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:be:cafe::96) by DB8PR03CA0002.outlook.office365.com (2603:10a6:10:be::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.18 via Frontend Transport; Wed, 25 Mar 2020 18:30: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 DB5EUR03FT056.mail.protection.outlook.com (10.152.21.124) 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:30:59 +0000 Received: ("Tessian outbound d6b3ed9fc62a:v48"); Wed, 25 Mar 2020 18:30:59 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b4c8fbd080b7258e X-CR-MTA-TID: 64aa7808 Received: from 6f48c0142a7e.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C1520308-1DE4-46F0-9739-23D4DA3883D1.1; Wed, 25 Mar 2020 18:30:54 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 6f48c0142a7e.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 25 Mar 2020 18:30:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H4SFBr/wnepyAGTITGp5E9Mp65M7fM3Fr565B4YEpfeRBM1ZsEHXb+3Z+X2fErDFKFCP6S8mDef/10k6P8+oz4OSDpBG7pNUumVpKrqlg6/HW8iXKXwl8XwmOz0j6kxkiRH6GIkLgfBbxMNLWqgvbqJqlQ0xStvvMHFUvWBU2QlI4iUVpcOFykPUqZ8H0jwzd+pbEJrGke4EU/VOOrR0JSJ/pvQXFknREfh1OQ9osA/vfj2XEFYyixoELGZc5HmjavcPAp7n14kTcaFUUBg4Q/MgsU3YsqgRS6iB5qAws/e7ZRAy40DCV2osO6JeTePpLYCBQfR74TFLX+yDgbv9pQ== 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=Ic2mTJU0Nk8YRuu2eCcvSjEg0CcDy98Q/CpnTj/GqtE=; b=bi75tzoO8zaJsXLaPtNFTduSUvS+smH8n2+4rXmSsNEngX5MceMOpgIf8MXlQFjHbSqbW5KuKfuyWx5P2zI3PNVAED5l8SaJ5EOhifucjjgzJWHglrmrPoSt+NlXkfXR+O+HVXwCnOTSJRxhQJ7Y+ZN9afBUzBGhsOJnTaRsjmwpH+W4hJiSGR3M5hs2RdjRyptQOdtXN0s2PtwER3pl0gJmu7gvCXpr4ubkww0hn8eKI4ld1BL8+qu9HMIL6mwcCGgWIGEcC8Pz8aFY55+rqPVwasRH05Pn5bpKqNhxKDAlXhckoBCNalsCx7+iCaM9NKvLY01RIlazgTOVipJ3PA== 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=Ic2mTJU0Nk8YRuu2eCcvSjEg0CcDy98Q/CpnTj/GqtE=; b=wSeBy/jhOLFgE+HDGETB9bWGXDwoW/As24v2GV+bBitoMvjlSHI3bIPXc9rVXEirO0/orSoRQWa1SptmODZkUBUSQKjJUsAEdDDkNfRuE6vLg9SCRXTXp59mwyN05M8AnTVz6x1oRN3Wglw8RFztweA3XXhQ6rrj68fs+RPqXbg= Received: from AM5PR0801MB2035.eurprd08.prod.outlook.com (10.168.157.147) by AM5PR0801MB1732.eurprd08.prod.outlook.com (10.169.244.21) 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:30: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:30:52 +0000 From: Wilco Dijkstra To: "libc-stable@sourceware.org" Subject: [2.27 COMMITTED] aarch64: Remove HWCAP_CPUID from HWCAP_IMPORTANT Thread-Topic: [2.27 COMMITTED] aarch64: Remove HWCAP_CPUID from HWCAP_IMPORTANT Thread-Index: AQHWAtM0xx1MhpwL60avpCc4pgLlnA== Date: Wed, 25 Mar 2020 18:30: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: cf988d01-7424-461c-ae43-08d7d0eaaa7c x-ms-traffictypediagnostic: AM5PR0801MB1732:|VI1PR08MB3133: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:2331;OLM:10000; x-forefront-prvs: 0353563E2B X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(366004)(136003)(396003)(39860400002)(346002)(376002)(66556008)(66446008)(66946007)(8676002)(186003)(64756008)(2906002)(66476007)(33656002)(76116006)(86362001)(52536014)(5660300002)(8936002)(71200400001)(55016002)(478600001)(9686003)(26005)(6916009)(7696005)(316002)(6506007)(81156014)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0801MB1732; 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: tZ6YVbkLL8dTN91k6WoBL7D6df2R6pd30HEHaUdH2hCogbpPdl+h7H4u3fUblNIA0+SIp5nH140YIPGs1YOB1CGOT9RBCGF6w2yqCnbVzebT+L2DdNvVphijqNM/wPu6SxtKYD0QAt2E+WIHnV8XaoBFdyNIT1U4QCGyuuXNJMF2Td1lyKpAFOVt4VkwDCWydQcIJ8OcI2mRl4xte4oMy3Hb2nXOd2UFVS5Dzpw2K1BvSsNHGMCzsrlj9mqCVcs3/uKuNd4NmF29N72W2SQq9KfI7i1SMFBGUMS3aKPjKLFU3iI8MPmkUhJazLSGPS42/QwzvWdCRbbfSa6zLBxQ0tYdsWpWnhhYoxdoPXsn7yf/JjCAV5nZtWFW6OzINBthf43G8CBfelFfGk2LT+sm4hhGXc+9XHcw4m5yvLBUW8WbF2XXCFTM9/SRF6ofsYIO x-ms-exchange-antispam-messagedata: y0Ka7lQG4DMwlEysKg0rn2W9PtatBpa3kFjiGM+aEy/aDHzPFtTsY3HVmUqN5DxiK8bK3d5FkWPuethLH7iuN/oFMeV3qbCXUHCfTtI4YzdSO8+UXE1KMLnOrx/eaKCKrCWgAxT0iUZFowC4bmh42w== 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: AM5PR0801MB1732 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT056.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)(39860400002)(376002)(136003)(346002)(396003)(46966005)(86362001)(478600001)(7696005)(316002)(26005)(186003)(82740400003)(6506007)(336012)(2906002)(356004)(33656002)(5660300002)(26826003)(8676002)(70586007)(70206006)(6916009)(47076004)(8936002)(81166006)(55016002)(81156014)(9686003)(52536014); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB3133; 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: 26e80235-dd08-4e0e-d617-08d7d0eaa636 X-Forefront-PRVS: 0353563E2B X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LEN0rluAuEAnJee88mgk0w50/1YKiqTVnlOOH73k51h4ENZQ3Pd71DlpYxwrVBK2fzSlyG/OELwdhRw3JiMMggyGcDwwb+qIlMh7+eR8Fc+GA5gX31/34QOOEYTKhhJ7CEz8GuQORqmxZkYBGtpqskTSmNTsdEvqBSQ+KTFfHFfRnCikV+xl4N7U0P2kCb4eRF3NHvPiFM8NSf8VEf9W0oKQaZ57PlD1JPV3tUJiXWf4p4Ru50pokNMYbGTsu1Ld2nz0EVkwYUvzgAjjEbTmrsgLcgebOnkvKZvSzy4hVVJCvZwJyUkmh98CZFvpFF/4AMcAK1GYirNP9vMxQgocnv/fYFeM/PLPU5sjzZfI0LdskXuW/2P/8yw6j/csJaH48dWz+ToxZO2NavIufPTv0XTBWG8ZgwWeTloZlZkd+ArEe61SCFZYeizOwD7Km7WupDWgj2hoLrvliCXvSXliloUGtSPNuwnqH1A3CHfGAu9kQkKYjpXFRhF0mPh5ALL68qfqYn2X98BCJWMUDx5I5Q== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2020 18:30:59.7376 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cf988d01-7424-461c-ae43-08d7d0eaaa7c 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: VI1PR08MB3133 X-Spam-Status: No, score=-30.0 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:31:05 -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 3682637..b8db0f2 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 e3fb09e..540e93b 100644 --- a/sysdeps/unix/sysv/linux/aarch64/cpu-features.c +++ b/sysdeps/unix/sysv/linux/aarch64/cpu-features.c @@ -53,9 +53,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 @@ -69,7 +66,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 6887713..c0dcce1 100644 --- a/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h +++ b/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h @@ -27,9 +27,8 @@ /* We cannot provide a general printing function. */ #define _dl_procinfo(type, word) -1 -/* 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.