From patchwork Tue Nov 29 16:48:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 13058851 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 789BAC433FE for ; Tue, 29 Nov 2022 16:50:16 +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=NgLWN2xJoG+wGacYdiIzYqlWwNHLO+tndAu4AceSAJ4=; b=Sb5TL2IRPbQE62 WFEJ9Nq/OwMEViqq+mlZDnUAsjBd4V0GgpF3rvQjafsgVSKFp4UQYJb0KJr3akkGlNrWIg5nBCJRe f3MrVAIoixHnqOF9Q+K7g/EbCXobRcTX97hPIZkkYAwigy9SP6RcV1g7nZ72dl2tJWnXLKkfJd8eM vjOAt+GUHVxBJJhzo/2EnVKTbvX6VAAmS4oEqcmHf7S31JCtdBeG46YqKC1xAWG+Bv7+a0T0tFFEu j0Ezn0q8kLD4GiOp3gGwmQ30eFpuy0AcSKm60u75bhX8Cs0Ptsduy2hP/WdxLEYReNxfiXjx5GAT4 SCuTWpY9C1I55I6f3l7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p03nC-00AFmE-6A; Tue, 29 Nov 2022 16:49:10 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p03n8-00AFif-8Q for linux-arm-kernel@lists.infradead.org; Tue, 29 Nov 2022 16:49:07 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 13AC2617F0; Tue, 29 Nov 2022 16:49:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B7D1C433C1; Tue, 29 Nov 2022 16:49:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669740542; bh=6iD2n0KHW8TQQqOuIVsk1zfdUPSdWiqEGvFsqtmVE7E=; h=From:To:Cc:Subject:Date:From; b=Sb0ipLDfk5kQdcsM4wmUtcFLzK9m5epoz0HSqko75uYGTRi/YEMHMnXkyeYFLY2gS NJaChgtn2o+bHU88vvQHL+V3u6Ve4tBKw7BU+nw9A13eSuPjbdufdR4teE4dR7n5yp kyAkORy5dQLn0TvfBQ2WHY0oXng+jSpSpUvdEsGzyk9EARTD+MMV8PFA6sl9j9CzX2 sIBImN5RFFDpxfJMXxDLH9FMXTmVKSe9GkNecUlDjLmk9GvcG0eFTDY8X2mjJGWbn1 WByvWJQjRWyr8264yzVjFC+yvqBfMKCwG5DSsX4KImP6XX+ngJclihUyI5H7/wAyU0 lffTmWo17Ebyg== From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, herbert@gondor.apana.org.au, keescook@chromium.org, ebiggers@kernel.org, Ard Biesheuvel Subject: [PATCH 0/4] crypto: arm64 - use frame_push/pop macros Date: Tue, 29 Nov 2022 17:48:48 +0100 Message-Id: <20221129164852.2051561-1-ardb@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=996; i=ardb@kernel.org; h=from:subject; bh=6iD2n0KHW8TQQqOuIVsk1zfdUPSdWiqEGvFsqtmVE7E=; b=owEB7QES/pANAwAKAcNPIjmS2Y8kAcsmYgBjhjftS+8JXLMKyuRpTCfIGjThLbU/Fr25SDCzLPjb sI+y5HKJAbMEAAEKAB0WIQT72WJ8QGnJQhU3VynDTyI5ktmPJAUCY4Y37QAKCRDDTyI5ktmPJC2yC/ 0SkhQTbDeLV3Zu+PlBiBC/3qMF18khEHhIjEXVgxeLzRsbg81e9xXmU5HVpGFwRIUbBH/vLQA1tU+F LDDr4tWv4FuaeH19RyaTNVvJI7ROFNVZAlufP+q4a2KQE9tCU7Cs0wagwH+jzgvi3Q0Ek5KJanCjsC wn13aSffEZVy60nWmHfbw56eYtI3Ew9KcdBikphpU6Ql3Y97R3S3D5viWEpGcmzYRoXYWi8XhCn3z3 Klw2guXz/r9VsV+5enE8ZLLz6k63xHI0duOkWvNvNzqYnrY73zrgxTokI1TQB6My9D5e9OXivKA6Z5 pKWkPCgpqMhE03I5R0QjsXn+f9zf73T6y3Pi037OTCV7Rb0vd0ij1Ufbk7W6U65hmibKuML6zt9Dqy aJIPSzGBZ2h1mdZB/9WyF+N35loclzGyARQ8BrX27vy3wC3y2RcPHXMJyG/F14pIeioYQ+vLRXOgXF tXG5Jeug5ZrB1k7hq+KmU9PDm/98Ex9bh5PnY0uGFeilE= X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221129_084906_359448_419ED8A5 X-CRM114-Status: GOOD ( 11.00 ) 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 We have a pair of macros on arm64 that can be used in asm code to set up and tear down the stack frame when implementing a non-leaf function. We will be adding support for shadow call stack and pointer authentication to those macros, so that the code in question is less likely to be abused for someone's ROP/JOP enjoyment. So let's fix the existing crypto code to use those macros where they should be used. Ard Biesheuvel (4): crypto: arm64/aes-neonbs - use frame_push/pop consistently crypto: arm64/aes-modes - use frame_push/pop macros consistently crypto: arm64/crct10dif - use frame_push/pop macros consistently crypto: arm64/ghash-ce - use frame_push/pop macros consistently arch/arm64/crypto/aes-modes.S | 34 +++++++------------- arch/arm64/crypto/aes-neonbs-core.S | 16 ++++----- arch/arm64/crypto/crct10dif-ce-core.S | 5 ++- arch/arm64/crypto/ghash-ce-core.S | 8 ++--- 4 files changed, 24 insertions(+), 39 deletions(-)