From patchwork Tue Feb 15 17:07:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 12747371 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 8AF6BC433EF for ; Tue, 15 Feb 2022 17:10:48 +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=jSMZYa6JZ3fDOCoN2YrVI5XtB1WwHQv8cA17xgaONig=; b=JeXlnD8EH82ZyN k8uLD13PJbF3MID9wpO23Y1K/kElqkfXhyjhaAg/feCaTk6tLJNfhm4ZvzHAKn4L960srDXElYdJ1 NDkKWUSRx0IDilu+2jKIg4yJe8zt9r5iOWnOcDMq3JU3CBw2GoAGzJR5Dhj/VjzXyLRtUw8yVvJf5 Frn/FWrGY3dE7pLfvlqPtKFG7EigGTFF+twUvvCA6vUrWbAs8j9nsz3qZhHq196rHa7Gdq94KW3RI NGiX4BQ1eT4nlB3Q4MmOmZcxMLGnHiG5HfSFNPx2SQSKAj2Klx5lG31V+gurbpyxnd1eXPCCJB1rG B8SIv0V7s/4guo/3YnMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nK1Js-003pxR-DX; Tue, 15 Feb 2022 17:08:53 +0000 Received: from mail-vi1eur05on20624.outbound.protection.outlook.com ([2a01:111:f400:7d00::624] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nK1J3-003pjq-Ps for linux-arm-kernel@lists.infradead.org; Tue, 15 Feb 2022 17:08:03 +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=4/bF+JTGMFKHnfX8e+epe5dfdTX85y6z2YB4cnO/0cU=; b=bPecnAV4p6Dg7nVVMlhq8FU1fnW7Ww0FdJQaCyavMEQvqq7sR/I6pRVXl4x8f0e5cAdMvo7S94/jSllF1S8caBYOjqqbrwI1gj0tzmG33N0BLA5eXGf5jTP5jVNSIgVU/RTVmCSItV+km2autIhZA3H5o4WYsDA2R5FWPk40pFc= Received: from AM6P194CA0014.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:90::27) by DBBPR08MB6187.eurprd08.prod.outlook.com (2603:10a6:10:209::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.17; Tue, 15 Feb 2022 17:07:57 +0000 Received: from VE1EUR03FT035.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:90:cafe::51) by AM6P194CA0014.outlook.office365.com (2603:10a6:209:90::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.15 via Frontend Transport; Tue, 15 Feb 2022 17:07:57 +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 VE1EUR03FT035.mail.protection.outlook.com (10.152.18.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11 via Frontend Transport; Tue, 15 Feb 2022 17:07:56 +0000 Received: ("Tessian outbound 31aeb3346a45:v113"); Tue, 15 Feb 2022 17:07:56 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7aedff48196a25b7 X-CR-MTA-TID: 64aa7808 Received: from 6ae09b5eeb25.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 224279AE-C451-4316-AE00-94E44773B7D3.1; Tue, 15 Feb 2022 17:07:50 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 6ae09b5eeb25.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 15 Feb 2022 17:07:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cQCN6TQSW0Dd76I/bVhckWdga6fpZadC3l7aFw8bOza7y/w+7N77LS5anHMrTHuMnyPYLwqtDBSc2r35J5gMFZ4u80xxkoCsuYL5Vo8Ytd+xatDKDRCE5JXtTF8n+gcYCWMJC72E+IAFeO+mCJgkNeJJzqGF+lcfOAHm5LUUNbC4Rvea4DA1xz4yOdaES6IonIyiML9B9aAMX+ZoCbh5BX1h/I9wBpsvYXbkOczqQ2veXbuz33mSYYqO8uXTgUJNBpyN1MjSgLEPGtxgMlbao6y7+3ogiF1yhRIoG0sx0EzsGYY7AuURZX2JBSvcCzKs7JgdpO0TX7B13A7vZJWBTA== 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=4/bF+JTGMFKHnfX8e+epe5dfdTX85y6z2YB4cnO/0cU=; b=hE03EgQ8eqkWasc9hW+JcP4BsZ+3ud18XORZ8pD3BM5eEZRvIEn+/p0rsOFwJCPavuGyY7zPnQVvDBg2wPBxvIqoXeJ5Je0KHD6TDkHTLFa6XwkW7xuLh4ceDGwS9qm4CGhWRwsibhrUrLKHJM/YIPtb6f7EB3gXUR+zWqHi2vL2E32vQ2IXukQHR/BbDl0h3NAhekjoUsSt6MnrarZFlK8Lb1Wt6XUi7+gK3pzVs93rtlvZnfnQU1IRwEN+V2F363GxKYHy5IZYgZqHiRYocIAgps4soS3DCtIiAt1PlD9YNOEKBcS17gRirpKU/eq7QaCp+/ng/90NSXQCis775Q== 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=4/bF+JTGMFKHnfX8e+epe5dfdTX85y6z2YB4cnO/0cU=; b=bPecnAV4p6Dg7nVVMlhq8FU1fnW7Ww0FdJQaCyavMEQvqq7sR/I6pRVXl4x8f0e5cAdMvo7S94/jSllF1S8caBYOjqqbrwI1gj0tzmG33N0BLA5eXGf5jTP5jVNSIgVU/RTVmCSItV+km2autIhZA3H5o4WYsDA2R5FWPk40pFc= Received: from AM6PR05CA0027.eurprd05.prod.outlook.com (2603:10a6:20b:2e::40) by PR2PR08MB4651.eurprd08.prod.outlook.com (2603:10a6:101:1c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.15; Tue, 15 Feb 2022 17:07:38 +0000 Received: from AM5EUR03FT011.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:2e:cafe::e4) by AM6PR05CA0027.outlook.office365.com (2603:10a6:20b:2e::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.14 via Frontend Transport; Tue, 15 Feb 2022 17:07:38 +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 AM5EUR03FT011.mail.protection.outlook.com (10.152.16.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4975.11 via Frontend Transport; Tue, 15 Feb 2022 17:07:38 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 15 Feb 2022 17:07:42 +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, 15 Feb 2022 17:07:42 +0000 From: Joey Gouly To: CC: , , , , , Subject: [PATCH v1 0/3] Import Arm Optimized Routines str{n}cmp functions Date: Tue, 15 Feb 2022 17:07:20 +0000 Message-ID: <20220215170723.21266-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: 1312c704-ecca-459d-dae3-08d9f0a5b653 X-MS-TrafficTypeDiagnostic: PR2PR08MB4651:EE_|VE1EUR03FT035:EE_|DBBPR08MB6187:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:820;OLM:820; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: YjYV9cz7IjYt0n8C20uTrsx9fib8gp5+5UuRCqVgiFp4l00OMGG2T6jZl6nyciXsD4PGh55Nk+OtwKCnLj0mMHDYwE85m82GOd/wJMoPAfkgQJv8/pDmUailWfHxVH+5IdvPHtNDY7SVPPJwOtpEUVVJslfUQ6+7mtIvzvjJTLXydfekdR5N7mHncMOLptL6ISJY5kVCOZSojajyzHRj/NIe0J/OmCPdfoQxEkPD3RAEd/8gqw1AYiMwy6FhQaXXWq7RSIK/D1tQRI5CVHFFp/nbnb7x/YHrM0/ncpcRV8MSwkAYlOxGWMafGY0pPoAP4yMA79OMcghROJkLmoDHC7AjhUn8rCRJJmAKQ2TUGk6idSlfXD74B7Fn4hG6uU+vkihWXbKJemjvBfKnDoDB6ah3fBFOmy3TNe/UtMqZGLKkw9A4q8aK5esvzQ/sQfOvCrmJDx0VkwiedqiMNo2OOxvH7Y0N6CB6HbdtC9GCC7+RYbi0uHApXxv6JlE7fJvF/p/ArFCjEEoYkVpoHsCFH0QzC2llQ2IhCoUVlD6/E8nNyJ9aCDS/aOUKm8yjP6ehmDdVqEIjmNpvJoQoqBh4R1w1m0kaCjlnqxc7sqVnNObqvn2SNKbkyK/96GRdmh829DOsJNXg4gQmr97K1By6RIMOTiZweobSAxzwEuaGK8SUvjp4hF4LnAzAxh4jav/mAm38s6mZBoOMfnOW8kaeOYgKlJxRJQINOibIGjWLIHXmd9WJmY/T6/UGiNFwUnI8nPVokr4fXYLU/V5HpE9xcNhgi7hoH7Qua1olTb7uog4= 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)(36840700001)(40470700004)(46966006)(186003)(7696005)(1076003)(26005)(44832011)(426003)(4744005)(336012)(2616005)(82310400004)(83380400001)(316002)(2906002)(6916009)(54906003)(966005)(70586007)(86362001)(40460700003)(47076005)(36756003)(6666004)(81166007)(508600001)(5660300002)(70206006)(8676002)(36860700001)(356005)(4326008)(8936002)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR2PR08MB4651 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT035.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 195ba3ab-3769-4059-9607-08d9f0a5ab25 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uDC1C8pbposGHKDv7lQHrkCerQeqkWcZoMCPKP614FTs7BwdJztc61n+TMpD1sk5/Ee00/3kTBSCTdKR4V9wyy1G2H1wABRL5Lx0ODGF7txISpvSypXFHYn+sgxKoBU/LrVEdWkFM5O9eXZGsjrfjEYUhRZw2TgaEOaZKlGiuF72ujit2rSTQWIMFO+j3b6og5soUTfBiWSJsmXdspHvacTbQXm9RUVUjQWrGGy2bKLGwP0tJQYNH2T3rbtPOTFlABxXKQkLV2J1sQqWZZqOHzpiLN0JWQ8FpxLsIdfRi6xay69x+RV3mgly/RDr0svaXmujKLd5/iUnf+2HoKPywqLWpOLj3CD/sFud8DzlQN5X374IWGKcbRMNpGNyrNau9vXecDqBy3v85gwsp1HhKND9BaiZ9Ob03QYegqBllo1qi3u6+FCCwc+x72IF5VcJPW+QASXkQpMP5NZuo153dfH7Azo87gUPVWl8ftJSEYy1XKiblmEtkT0QsR3T5SZ0juaOBMOlzMPmOrgFKizNIZV2MreoTfZthPQwqATppcxdocMJJZbf0Lw0e431A/W7lCjyP706n90O3FyEoYP5Gr8eLBt9cyqn0jNxfUbbE5rqof56sVkuujjk4bZQm5QyGAXHZ6xl2ckTenW5Mx4lZY8x5IsXdJIbZkJXa4dSJ4PxQasDVxmyg12883vRlAFLe8Y6fp5B2flwbkweOjdJGKny1WRW1BeU30UPHgGuC+Gr/Flwe4i2/zJiXS6KF0MscIIezaNQI/znC3j6TzACcA== 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)(40470700004)(36840700001)(966005)(4744005)(6666004)(6916009)(54906003)(2906002)(1076003)(316002)(7696005)(44832011)(107886003)(508600001)(8936002)(2616005)(36756003)(86362001)(82310400004)(5660300002)(70586007)(70206006)(336012)(426003)(186003)(8676002)(26005)(4326008)(40460700003)(47076005)(36860700001)(83380400001)(81166007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2022 17:07:56.7761 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1312c704-ecca-459d-dae3-08d9f0a5b653 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: VE1EUR03FT035.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB6187 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220215_090801_901483_7473CE5F X-CRM114-Status: UNSURE ( 6.58 ) 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. Thanks, Joey [1] https://github.com/ARM-software/optimized-routines/commit/7b91c3cdb12b023004cb4dda30a1aa3424329ce6 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: Mark Rutland