From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2041.outbound.protection.outlook.com [40.107.20.41]) by sourceware.org (Postfix) with ESMTPS id 634043858D1E for ; Mon, 20 Feb 2023 15:43:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 634043858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=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=CyBSrHeTsDobD0lhvM8GRlfpy0pD/gsN4F4h0117/bs=; b=fNeIPwqsGyWUi8AuYDUmt2xnyx1GuJkx2gAFcllPpJJTSqOsvsArkUytgQuSXSQbYfn7ag7Fy0KWRY0WclPycen6dKvNZDKArRdUJqs1nudO8g/Fe2m0/7iBre9QEWagxwFtsTGh5WfVcuCF5/EuJgg6PNI+4FxHblS5Qeob81I= Received: from DB9PR02CA0006.eurprd02.prod.outlook.com (2603:10a6:10:1d9::11) by AM7PR08MB5527.eurprd08.prod.outlook.com (2603:10a6:20b:de::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.19; Mon, 20 Feb 2023 15:43:27 +0000 Received: from DBAEUR03FT057.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:1d9:cafe::f3) by DB9PR02CA0006.outlook.office365.com (2603:10a6:10:1d9::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.19 via Frontend Transport; Mon, 20 Feb 2023 15:43:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass 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; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT057.mail.protection.outlook.com (100.127.142.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.20 via Frontend Transport; Mon, 20 Feb 2023 15:43:26 +0000 Received: ("Tessian outbound 333ca28169fa:v132"); Mon, 20 Feb 2023 15:43:26 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7bf9b2dc93075c31 X-CR-MTA-TID: 64aa7808 Received: from 60a949b8195b.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 23BB7682-FAE8-439C-A61D-88BB3991D692.1; Mon, 20 Feb 2023 15:43:20 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 60a949b8195b.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 20 Feb 2023 15:43:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GHoZ6UH6kVI2ozDdw0u/Cf8pUHoWlkQE121RGWUUd2RipYL7hIRsjUB8DVaEgk0khIPS80t2nq8cZIcAMM0jkdiaWA+bVmY6xR1K/jgvAAEn1l+yvgKnatd41DbcHixowbU88NvkwnW31KiF5swJgDTtZIX1MTFG3zXN1PWElLnKDlsxRm7tusqTkcQKcQuUK800aEjYN5qoMv+/hR/D0hEEfZmmlVWjNo7kUF6XZK6JFoVzyiYVJBr2GLHhyCnNwTeKVOwE7xsd3hGscVuKti9imS04SeG2G9SZH1XzUaSykQpmpSUesOOi2eDcVdIdUJkmQFBSRSstlfm+Ti+vFQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CyBSrHeTsDobD0lhvM8GRlfpy0pD/gsN4F4h0117/bs=; b=ACZpPF/YrXuYKAIjqnZ0OntJBlqTgB9BCd4pJJ4BCXltJ3a3nolk8Rbfl7UopsqI94k3f/jep3NNHELg3W/n9sEELhjhzCiaiFWVV0Y8WKzx5ztJKGBTS2T4OEnAmNSz499olL6bGQJ2rtnvXtrRbD3CFjh69LiGfFAIa4on57aV9Plo0jhLNe0tUIjshEOGrmCReJ2LVj9oz0s3EkOZ3oW/mzeKLl+8pwO2THIkccS09CoiX+Lu0Y71PHGZDAVsEouaj0TgxKZNJuEvUcOwX7TuvJO4aj24Yl3IaPDYm4lv7zf2BdVPDGt0v67XW1MXt7o15vnlXakvOHyoPjKOhA== 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=CyBSrHeTsDobD0lhvM8GRlfpy0pD/gsN4F4h0117/bs=; b=fNeIPwqsGyWUi8AuYDUmt2xnyx1GuJkx2gAFcllPpJJTSqOsvsArkUytgQuSXSQbYfn7ag7Fy0KWRY0WclPycen6dKvNZDKArRdUJqs1nudO8g/Fe2m0/7iBre9QEWagxwFtsTGh5WfVcuCF5/EuJgg6PNI+4FxHblS5Qeob81I= Received: from PAXPR08MB6926.eurprd08.prod.outlook.com (2603:10a6:102:138::24) by AM9PR08MB5938.eurprd08.prod.outlook.com (2603:10a6:20b:2da::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.15; Mon, 20 Feb 2023 15:43:18 +0000 Received: from PAXPR08MB6926.eurprd08.prod.outlook.com ([fe80::66c8:9f81:db40:93b5]) by PAXPR08MB6926.eurprd08.prod.outlook.com ([fe80::66c8:9f81:db40:93b5%3]) with mapi id 15.20.6111.020; Mon, 20 Feb 2023 15:43:18 +0000 From: Kyrylo Tkachov To: Alexandre Oliva , "gcc-patches@gcc.gnu.org" CC: "nickc@redhat.com" , Richard Earnshaw , "ramana.gcc@gmail.com" Subject: RE: [PATCH] [arm] disable aes-1742098 mitigation for a72 combine tests Thread-Topic: [PATCH] [arm] disable aes-1742098 mitigation for a72 combine tests Thread-Index: AQHZQp5e41AVMvZykUqBs6WHcBo67K7X/ZYQ Date: Mon, 20 Feb 2023 15:43:18 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: PAXPR08MB6926:EE_|AM9PR08MB5938:EE_|DBAEUR03FT057:EE_|AM7PR08MB5527:EE_ X-MS-Office365-Filtering-Correlation-Id: 41725244-90b6-4ca3-480f-08db1359353e x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: JjXH0T4s9cyde6r7j0Yu70hFXnmBXrGBfL3urGQ97Cdhsg/dez3fEn+W6TY27/ASBzzNDFGR6Lj8s7BY5WXJQ/Ryv6WSpttXENx+DlHFAJA/OufSF1TCpN1qgKVIYQyuoaNxEzS+pxASFZSFXfZwn/Ouj/tkgxfe6E6Ltdr+scOhYUqqFnEJOlxSV+LALSHfJ56GC3IPzKPzjFxCfCOJHyBrUJFnMsUYL1kaDR5PGa4ROScQ57VidHRIbQZnEV+IRGM3SQ05i6nY1fUrzjg2Xz0SFIgUaH7fQhsoEvBonbnFGHbNcYAspahD8oxv55WPFsOwK6/6eh4NaD+ItzM2JVsRaFUkBV6WAxbTm5p8A5eSu/bEYdT+RmHM9S9EB8oLIcGFdGyy2TGt1qHLZYfJo3Se8GGrEtZ+vz2M8vpMOMP5eu+8c2YRjoN/2tkcvdvgONF8FJ65Ii+quF7jlx9cpG65+Yr3DmdZ+Dx1Y2VfD0o/8QxKn30kmJnyv2OlKgcbILDKC4PS5n63Yfe9zrQYx4IzCymSIsP6+IXCNYoN/ZCu5R5ipnF6d1cd9z7y/jnkv083Ky+tUXQ7ew5vgMthDWdKt7d3pqB8j7S90KT1YQfA5Mw/n0DIQi/o7VDxzz9jreUkT6TTSAP1MmY7OclfsyPaFXEpSN31CTvU9gqWfLLq4/9ggebP5GWf7geE6q5BlSkZNfh/WrcQeBINGVz3NttZCMjbEbK21u53HZVD9oVCkJwuyn623oVKV3uGRa4y X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR08MB6926.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(39860400002)(346002)(396003)(366004)(136003)(376002)(451199018)(38070700005)(186003)(55016003)(316002)(26005)(83380400001)(66556008)(478600001)(7696005)(76116006)(8676002)(54906003)(64756008)(66476007)(71200400001)(4326008)(110136005)(9686003)(86362001)(966005)(6506007)(66946007)(41300700001)(5660300002)(66446008)(53546011)(2906002)(52536014)(38100700002)(8936002)(33656002)(84970400001)(122000001)(2004002);DIR:OUT;SFP:1101; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB5938 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT057.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 7d149e25-e9e5-471c-f69c-08db13593054 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pqTQl/2Ym4CGckPdlE8GQkJR6+iqLiF2C9VjSivhvXPYGGaVNTVp9NUs6p0oZ6pxiHSJAapa6QhrdVJ4q+YQPNsUqTF+y4Tyuinmg8900w+CS/62CMNyYNuQVUjadbSCqJcuajh8tu7/YlwMHecEAjV1PSmIBssj+9wmG5T6qgAHWaPN7Lyt+M9sxhNXQSzFGCEVm/j+MsFLGfegPEEV0ZTnvIjyIJ0y/r6whOV07rrlkw4YWeLFN/cgshNi2u68gQO/g36g5adZMLHANy/dDYPWChkcuGt9+eHSfls2CjfPgpfhTnKhODeUCXd83RccMe0AIqtRE32rSlSNB9cSNG9n060JRygQOwgXu9aMSEs+/+4wNAYUzOh+OXoe7rKK4ASACYIyIjplalfrMOtY+Ldp7qPz6vgrM2qF67eaMR2JEfpiYK1D09lZzi4jpj0TYcD+0W+KUAiN4bc3xSdvrX2FHL5mdgNjOnQKR33mAdU94pfLXGH6lzA4odOyqp+MNdLiwvfB2FuF0T4O3Sc/krI/sJCOcYpwkPI3L9Cn+IjotGUx10undAjoLlNb7OOEwL2yxBMOusTIoVlGhsPFYv7/tmySDumPEVHr1c6IN+Fogr8lJYdO5GwPpZU8zR2K1qZFpniBhXf1ikN5BQbGqplMzqlJEihai2wgo9DXcWe795D0IIdidHY1AvrmOtgGz+rxiazhjrKrm4wf58YCNfzLux6gU/h1F2hXdtd9d8Bj4Q0E56e/n7/u5OZqdq3b X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230025)(4636009)(346002)(136003)(376002)(39860400002)(396003)(451199018)(36840700001)(46966006)(40470700004)(40460700003)(83380400001)(70586007)(70206006)(316002)(8936002)(5660300002)(52536014)(8676002)(107886003)(41300700001)(54906003)(4326008)(186003)(47076005)(478600001)(26005)(53546011)(110136005)(966005)(336012)(6506007)(9686003)(356005)(55016003)(82310400005)(33656002)(86362001)(40480700001)(2906002)(36860700001)(81166007)(82740400003)(7696005)(84970400001)(2004002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Feb 2023 15:43:26.9192 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 41725244-90b6-4ca3-480f-08db1359353e 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-AuthSource: DBAEUR03FT057.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5527 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,GIT_PATCH_0,KAM_DMARC_NONE,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Alexandre, > -----Original Message----- > From: Alexandre Oliva > Sent: Friday, February 17, 2023 7:06 AM > To: gcc-patches@gcc.gnu.org > Cc: nickc@redhat.com; Richard Earnshaw ; > ramana.gcc@gmail.com; Kyrylo Tkachov > Subject: [PATCH] [arm] disable aes-1742098 mitigation for a72 combine tes= ts >=20 >=20 > The expected asm output for aes-fuse-[12].c does not correspond to > that which is generated when -mfix-cortex-a57-aes-1742098 is enabled. > It was introduced after the test, and enabled by default for the > selected processor. Disabling the option restores the circumstance > that was tested for. >=20 > Regstrapped on x86_64-linux-gnu. > Tested on arm-vxworks7 (gcc-12) and arm-eabi (trunk). Ok to install? >=20 > for gcc/testsuite/ChangeLog >=20 > * gcc.target/arm/aes-fuse-1.c: Add > -mno-fix-cortex-a57-aes-1742098. > * gcc.target/arm/aes-fuse-2.c: Likewise. > --- > gcc/testsuite/gcc.target/arm/aes-fuse-1.c | 4 ++++ > gcc/testsuite/gcc.target/arm/aes-fuse-2.c | 4 ++++ > 2 files changed, 8 insertions(+) >=20 > diff --git a/gcc/testsuite/gcc.target/arm/aes-fuse-1.c > b/gcc/testsuite/gcc.target/arm/aes-fuse-1.c > index 27b08aeef7ba7..6ffb4991cca69 100644 > --- a/gcc/testsuite/gcc.target/arm/aes-fuse-1.c > +++ b/gcc/testsuite/gcc.target/arm/aes-fuse-1.c > @@ -2,6 +2,10 @@ > /* { dg-require-effective-target arm_crypto_ok } */ > /* { dg-add-options arm_crypto } */ > /* { dg-additional-options "-mcpu=3Dcortex-a72 -O3 -dp" } */ > +/* The mitigation applies to a72 by default, and protects the CRYPTO_AES > + inputs, such as the explicit xor ops, from being combined like test u= sed to > + expect. */ > +/* { dg-additional-options "-mno-fix-cortex-a57-aes-1742098" } */ Actually the -mcpu=3Dcortex-a72 here is significant only in that it's one o= f the CPUs that enables AES/AESMC fusion. So rather than overriding this awkward part with -mno-fix-cortex-a57-aes-17= 42098 I'd rather just select a different CPU that enables that fusion and isn't afflicted by this workaround, such a= s -mcpu=3Dcortex-a53. More broadly, I think we should be enabling tune_params::FUSE_AES_AESMC for= the generic target in A profile, but that would be a non-testsuite change. Ok with changing the -mcpu option instead. Thanks, Kyrill >=20 > #include >=20 > diff --git a/gcc/testsuite/gcc.target/arm/aes-fuse-2.c > b/gcc/testsuite/gcc.target/arm/aes-fuse-2.c > index 1266a28753169..b72479c0e5726 100644 > --- a/gcc/testsuite/gcc.target/arm/aes-fuse-2.c > +++ b/gcc/testsuite/gcc.target/arm/aes-fuse-2.c > @@ -2,6 +2,10 @@ > /* { dg-require-effective-target arm_crypto_ok } */ > /* { dg-add-options arm_crypto } */ > /* { dg-additional-options "-mcpu=3Dcortex-a72 -O3 -dp" } */ > +/* The mitigation applies to a72 by default, and protects the CRYPTO_AES > + inputs, such as the explicit xor ops, from being combined like test u= sed to > + expect. */ > +/* { dg-additional-options "-mno-fix-cortex-a57-aes-1742098" } */ >=20 > #include >=20 >=20 > -- > Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ > Free Software Activist GNU Toolchain Engineer > Disinformation flourishes because many people care deeply about injustice > but very few check the facts. Ask me about