From patchwork Tue Mar 1 10:14:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 12764499 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A95BDC433EF for ; Tue, 1 Mar 2022 10:18:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=62iWpNlqliPkwf57JSD5FJCGrZ089Zbc54ahgNTba90=; b=mfkuNuEVo4Qdrm IodYd5ewWV9kFQh+bpFTeqfiybj2s7QEMJGS0IRF/81hRSEKDu8+frm6NEQOZS7o/7G9dLQRy0E9a G/P0ItbHg4NXgfAtowb5/0reGxIqKqPM7oI+bbuwf04yzfMs4g8lWFKVOj0qHxhdrhG+NNDgceDD8 rs0a0WBE3/iNFu5KWTGIV/JlQ9QiiecSXBFFiENmXynJWPGhhIoTsuIrl9l2uGXKZTT56g2ZoArkU VaRsKNCfUMITliwGw6peDPbxTuVSSvv2++sC6KKE342XvFLtMzAQDaaFpjwRK57o2v0hXgWud+7Lq m364qdGakiaKG20tAR1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOzZ0-00G4fs-Om; Tue, 01 Mar 2022 10:17:03 +0000 Received: from mail-db8eur05on20611.outbound.protection.outlook.com ([2a01:111:f400:7e1a::611] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOzWz-00G3oU-OS for linux-arm-kernel@lists.infradead.org; Tue, 01 Mar 2022 10:15:00 +0000 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=ZxFCgLvOhWkeTkM4NQ1ug1aS0RhaWI8HuNoH/eMgWxE=; b=VG+1ACIq/O/1lznGdGP/LLYvCLOiLDrc/PPj5lDgqf2Tqwj+p7Q+0EkRjnRJpCC2EhKAYF9PMbA7uPMUd6r3qoLzcbSjvAYUeisyCBujw1ecT4VPtpUcquRakAU+Jdn8PwoMzQlDrruXVB9XLLNHVWb5ArR/GubCLci55o4ep8Q= Received: from AS8PR04CA0012.eurprd04.prod.outlook.com (2603:10a6:20b:310::17) by PA4PR08MB6063.eurprd08.prod.outlook.com (2603:10a6:102:ed::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.25; Tue, 1 Mar 2022 10:14:50 +0000 Received: from AM5EUR03FT055.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:310:cafe::2e) by AS8PR04CA0012.outlook.office365.com (2603:10a6:20b:310::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.14 via Frontend Transport; Tue, 1 Mar 2022 10:14:50 +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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT055.mail.protection.outlook.com (10.152.17.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.22 via Frontend Transport; Tue, 1 Mar 2022 10:14:50 +0000 Received: ("Tessian outbound 2877e54fe176:v113"); Tue, 01 Mar 2022 10:14:50 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4a87d8acfb7df44b X-CR-MTA-TID: 64aa7808 Received: from ae82c94951e5.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E620BFED-F9E1-4D98-8B2D-6F20DFFD232E.1; Tue, 01 Mar 2022 10:14:42 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ae82c94951e5.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 01 Mar 2022 10:14:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oK5OuBdH4Mp0YwM64lB1KfIqUSWuY8B1q3SFZidOND+gHyzeqZcIPF324HujMcik8FJANzAFcIwvhBVSzQWPC2IzcEGWPkzmaWiBtITZrPpNlvUdBBNF/WVisDuAf7VhA78lJ9x2tdY60Gbqj1g/BH/5zoCwLo8i3v7aghyrvhI5Y33Fj5ugWLX2xY/o8mMyCrIYaqMY48Nn0wNBOlP3gSu2zRqNktZzckYTBfolTIgx3jSKJwxba7EtEkiQWYzKTUnttlzPTbvMOJDsOdHE+Z8jpLqL2PgQldrnLLU7YrWTY1uS0z9PNh9f0RqNpA52JAgSw+WGd+mg9cf5Q7oYLQ== 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=ZxFCgLvOhWkeTkM4NQ1ug1aS0RhaWI8HuNoH/eMgWxE=; b=SSKJMcOoFRkJzUojK5GO70uoYrvZRvoH6jb0c117Yq3G9Ul1s4QiJ70/p+6A21njPPlxmpuJr0TkQcBxjFnVCj7dMhSPRkckVSD6Rg54pLJ9pgWZjZaT2JvMSl/OzAlsugcg/bYAgJbmzVZM5/GSBB+aJPb0UTyQCO2TflWYGoS8/l5iix6kbniAW0ieZfh9sk6BeZlYk2CS2xCEcUH/MFQU7Qsq2Ltq7MvO0vO3bcSNiY/vdRlKHWqP+vZ/qqCoQg+B+pIQ1sZcRJcWeAHp/2D9XWYEcvtATMCUe4rBBXYdh20B/Temyic7754uQQtDYWuFGi6mum+0v7A+6bUEDg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); 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=ZxFCgLvOhWkeTkM4NQ1ug1aS0RhaWI8HuNoH/eMgWxE=; b=VG+1ACIq/O/1lznGdGP/LLYvCLOiLDrc/PPj5lDgqf2Tqwj+p7Q+0EkRjnRJpCC2EhKAYF9PMbA7uPMUd6r3qoLzcbSjvAYUeisyCBujw1ecT4VPtpUcquRakAU+Jdn8PwoMzQlDrruXVB9XLLNHVWb5ArR/GubCLci55o4ep8Q= Received: from DB8P191CA0009.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:130::19) by AM6PR08MB3832.eurprd08.prod.outlook.com (2603:10a6:20b:89::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.13; Tue, 1 Mar 2022 10:14:40 +0000 Received: from DB5EUR03FT042.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:130:cafe::c6) by DB8P191CA0009.outlook.office365.com (2603:10a6:10:130::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.23 via Frontend Transport; Tue, 1 Mar 2022 10:14:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT042.mail.protection.outlook.com (10.152.21.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5017.22 via Frontend Transport; Tue, 1 Mar 2022 10:14:40 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 1 Mar 2022 10:14:43 +0000 Received: from e124191.cambridge.arm.com (10.1.197.45) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2308.20 via Frontend Transport; Tue, 1 Mar 2022 10:14:42 +0000 From: Joey Gouly To: CC: , , , , , Subject: [PATCH v2 0/3] Import Arm Optimized Routines str{n}cmp functions Date: Tue, 1 Mar 2022 10:14:32 +0000 Message-ID: <20220301101435.19327-1-joey.gouly@arm.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: e9958918-734e-4926-8782-08d9fb6c5238 X-MS-TrafficTypeDiagnostic: AM6PR08MB3832:EE_|AM5EUR03FT055:EE_|PA4PR08MB6063:EE_ X-Microsoft-Antispam-PRVS: 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: Z6A3Wk+OZ1gvUAqonUTn67bgYbUg4IzBzK+1nrXNPpFw1iyI0QMQifvmX6UwbuKXdfakbT7zXui6diXOhpcnffZRDYhdiWWr9Upsh7pR1vz2QlLcl3Dpt9fTyk6GX1m5p2E2xlCth6fQ9z1BL93dKU/bUyF5mvq0dYX7wxdr5mz7v6U7EUg9Z964h1aPRLDp9dGLIL5XXt/+5OaFS+FhSP2oOB51Tze8GyHm8w1kk1hRxsxqRb4GD188Trwk7QMWoMmRPL2VVvipaPcEEx5OwkfHUH9DoNfoPWIH06CmAbsMnZvohOKGtQAOr9g7F2lGtDmFtYZg+ptihx8LheqPkXI5GdQEOrCKxDHPisF5EsT9X+pU6ucoQvUoWQ2gJ7SyyUlA78tnkEcf0ceu2EO9lhmSGFZsV4OD3eBcej3g5FesZQ6IJopmLmyUGhTSo420fEW/1CjanLG1rY7d0t4qwlUBWpEF8nbQjcyoa55P4jZB8OvPAfP3hcEgpNkPDQHNHYv88e5978XLsuvn9pist5l2dn2rwrP1PNawfOm4CobecEJKNkpQa7EnuiD9/4605irtOvEUpIMgeYwiZWo8vznULhOjUnZ8CwJmiIwtTN/bk9CFgc1yLHn/90wX67HFGHZvBmpmwdJok90GZ0036hYuF8gvsFY7zYpNAslNdBQUel+ZQJR2xMzljecd7YioAfVNgWNZbpEA0rW+rLmbc51wOa8kE68PwZtBoZE1fcquSEopWn9FN/aXmBBN4MPjUmt8fOGL1Jv4DDCtkqKtwVjzhPK4UhreSK20I3poeA/CyOFB16/jCTvmYUKlU939f55JN5qHZTNrU+aWhs2MhA== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230001)(4636009)(40470700004)(46966006)(36840700001)(81166007)(356005)(5660300002)(7696005)(47076005)(426003)(336012)(2906002)(186003)(83380400001)(2616005)(82310400004)(36860700001)(26005)(1076003)(316002)(8936002)(6916009)(54906003)(4326008)(8676002)(966005)(36756003)(508600001)(70206006)(70586007)(6666004)(44832011)(40460700003)(86362001)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3832 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT055.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: e6b3e740-ac3e-4ce1-d6a7-08d9fb6c4c24 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 95Op9F0GS0H56yR/rRSICxskAMqTP01yJSlCZc/Ql9h9rHl3ubYTvf/pQBUUggfz6wxLQ9/sBjijyI2+2WBAxBSH9fIqTisus31UMz3xBCfLyY2TZF2HUSCLwmtV9uYhcOGDNHhqkM94epuwmxdeWj9toz92SYob7aKCQOmpDs8jYacOtDb/6u07XbsB/LkZsVF8fAo65WGKvL58TvzFLPS7gwD/YKqg4wkO3AIcf1A8cBU6k3G07PDoDTi99PKUU7ZL6Ol7QqVqxmwNide5eBsSPLGahtoCeCtOQLfnBF2qj9IbGMGF2nxQi5/b6UMgTRPMF3X9zZgsGJc82lnTs3VUgiPZ+pJKxjbFPaNAxqrndb6VSXo/GWEzMqkPccqz1TERihDCuVcu635U4tsf39Fl8xFIKwQVWfR2bKpo2xAKaFKjub0lhfGXTi75nr16HsjBCPEEYYnO2x04cPaplpvAyyak7Y6d1d/vtwxCAxS7eRUbwWhrw9ODobu5HcVeY3EENT66dTYXJT9JXdj4sJltUsG2LLmk04Eh+MQCCKhUn0DrUOT8H7wu+KqllxGjpH6/2D4pKc5u++8xnFj1/6kqKZJVXzLzwNrpL6cXkIARKqqTbBv7bHn0lzULbYlm0POujgkt9574761Yzov2eVdmM2IWGAA8iyWzt62IiydEHzDdVKRAZDRMe5pcVDVxOBe7ca4h1ceriEJoFGF/C44rFeUHYvJz8sEwmWIcpzpK5+5UdOkS8c0G74w4DmDk46LEzgBOVG1UZy+8JLKxgWyiY1YlucoVX3zenYxfu6k= 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:(13230001)(4636009)(46966006)(36840700001)(40470700004)(8676002)(8936002)(316002)(47076005)(508600001)(4326008)(44832011)(82310400004)(6666004)(7696005)(6916009)(86362001)(2906002)(966005)(36756003)(336012)(186003)(26005)(426003)(83380400001)(1076003)(2616005)(36860700001)(5660300002)(70586007)(70206006)(81166007)(40460700003)(107886003)(54906003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2022 10:14:50.3487 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e9958918-734e-4926-8782-08d9fb6c5238 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: AM5EUR03FT055.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6063 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220301_021457_846102_A184CFF1 X-CRM114-Status: UNSURE ( 8.53 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi all, The previous str{n}cmp routines were not MTE safe, so were disabled in: 59a68d413808 ("arm64: Mitigate MTE issues with str{n}cmp()") The Arm Optimized Routines repository recently merged [1] their strcmp.S and strcmp-mte.S files into a single file that is MTE safe. Therefore we can import these new MTE safe functions and remove the workaround. I did some light boot tests using QEMU. Changes since v1 [2]: - Rebased onto v5.17-rc3 (Asked for by Will [3]) - Clarified the license in the commit message - Added Mark's acks Thanks, Joey [1] https://github.com/ARM-software/optimized-routines/commit/7b91c3cdb12b023004cb4dda30a1aa3424329ce6 [2] https://lore.kernel.org/linux-arm-kernel/20220215170723.21266-1-joey.gouly@arm.com/ [3] https://lore.kernel.org/linux-arm-kernel/20220225142144.GC19698@willie-the-truck/ Joey Gouly (3): arm64: lib: Import latest version of Arm Optimized Routines' strcmp arm64: lib: Import latest version of Arm Optimized Routines' strncmp Revert "arm64: Mitigate MTE issues with str{n}cmp()" arch/arm64/include/asm/assembler.h | 5 - arch/arm64/include/asm/string.h | 2 - arch/arm64/lib/strcmp.S | 240 +++++++++++++++-------------- arch/arm64/lib/strncmp.S | 236 +++++++++++++++++----------- 4 files changed, 269 insertions(+), 214 deletions(-) Acked-by: Catalin Marinas