From patchwork Tue Nov 29 16:48:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 13058853 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 0162CC433FE for ; Tue, 29 Nov 2022 16:50:28 +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:References:In-Reply-To: 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: List-Owner; bh=KY5sj0Y7j8YMwTaSwJjLPv5sLfmA0acgBycj2sE/gOc=; b=oR0WRWfcYqmUZW 1ZuzoUBh6azKyjX8J6UnSFZpO/+rVd2IwIFl4IPfqrhqkkIes/lCTRVr0icKc0M9Z9JEJlx7Fa7G6 xeOmFgBtfTjK77uk818hkKvGo4dz/iPctIclxh2K4xXU2GurWIbY8tUCWdBYCYNOAY3TFcbAubvds JFdVO46nPGT3jSrXzdFbv1wZ5y5Uvw3rdLlPAoOtwyLNpNiCfj4PuP1pFFaS97rZoJvMr03L0YrlU z5/aXH8du58Y2VfUa3toEcvtjN7hEJTbHXN8kGYbwC9zBsPmaYmFj8VhbEPoVGhpPu1zonYSk258B 4YuGf8WuVNpW+a8p0wcw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p03nW-00AFs1-Pg; Tue, 29 Nov 2022 16:49:31 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p03nA-00AFlN-C3 for linux-arm-kernel@lists.infradead.org; Tue, 29 Nov 2022 16:49:09 +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 DE28761840; Tue, 29 Nov 2022 16:49:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62B56C4347C; Tue, 29 Nov 2022 16:49:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669740547; bh=ZbRwMgdjVH/Qv9iqeuJCWB3YxvidsTfyQPViGNEqq1g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EeSuO3dTjzVms3bDEpHzf6u680KHgxUIlXZEEfpMZH821ItLirr5iPD2YTTn/0I64 uM4vsMqwEX6LZ1M/9ZJrkUpD0qbsQsxvO1Aak/iExpoDt/YGvC8ajM/9WvMdTObWyp 8wx67kgIThXzhTOsMk1ZwV8SJI06/6mmttXaqjNREY2sw5p4xem9OvknL5Esz0wFYS PHbePp1Kc5hRUcaflxbUYlxX460QCMOU7/DvsJMsbXi/srwNoFmTgz8k0TwANqrRMS hX8rGUSVGAktUg4sq5iFvAPCyQD1WQEkEntdjTUaGxb6CYe65z+UUqGXd98EyyP/R8 KuxfHvWRtbNaA== 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 3/4] crypto: arm64/crct10dif - use frame_push/pop macros consistently Date: Tue, 29 Nov 2022 17:48:51 +0100 Message-Id: <20221129164852.2051561-4-ardb@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221129164852.2051561-1-ardb@kernel.org> References: <20221129164852.2051561-1-ardb@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=969; i=ardb@kernel.org; h=from:subject; bh=ZbRwMgdjVH/Qv9iqeuJCWB3YxvidsTfyQPViGNEqq1g=; b=owEB7QES/pANAwAKAcNPIjmS2Y8kAcsmYgBjhjfy6E1CYBE5bA5UpH3kQV3+cRFcI1P5dLV9IY/s RFrVwgSJAbMEAAEKAB0WIQT72WJ8QGnJQhU3VynDTyI5ktmPJAUCY4Y38gAKCRDDTyI5ktmPJNnaC/ 4sswyi115VJR32FGSYpUMS9BQWIlkfr+KNf4ZFr+UnlZdPNK7jazRVYrbAqI12bmz0NA8IIArLk/cF OxjUj0WBzb9/DuCcCl9iSyQy9P4Fk4KQqP9mGPxIEDmvh+qw5Epmesll83fIGkHa9jy3Er2JKRD9dh KsEvWjd4ul1BeCia9c9krSLmAisHQpBluTjbRnZhWYM9ilu1pzXF6d7vB7U2t19ejfevs5O8eIiKC+ e3gEdSJGphj4ZLCrYCOu1kK0oGeMXAdAnpY0Kc38bcaos03if662W05afUnocj1zkkxgYvH5DxAW5s phXYcG77CqJX5csK5+o/gzrwcPFZrW8yWpvhvMgj7nCew8tYbS7oSQ8nt5pYaUXzBb7qVEjFjivNvn LqxttqtYYrAH/QgpbmanXK3tb85ihEnMX4iav3zAjHSDWYB42W3SxkTFStdErAd7OFZpiJtP0/u80C 4/kDW3E2FYp8sa0gOB/RcWmydl+yCeRpE/BzOl4CTPyAA= 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_084908_469349_75F8CF18 X-CRM114-Status: GOOD ( 10.80 ) 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 Use the frame_push and frame_pop macros to set up the stack frame so that return address protections will be enabled automically when configured. Signed-off-by: Ard Biesheuvel --- arch/arm64/crypto/crct10dif-ce-core.S | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm64/crypto/crct10dif-ce-core.S b/arch/arm64/crypto/crct10dif-ce-core.S index dce6dcebfca189ee..5604de61d06d04ee 100644 --- a/arch/arm64/crypto/crct10dif-ce-core.S +++ b/arch/arm64/crypto/crct10dif-ce-core.S @@ -429,7 +429,7 @@ CPU_LE( ext v0.16b, v0.16b, v0.16b, #8 ) umov w0, v0.h[0] .ifc \p, p8 - ldp x29, x30, [sp], #16 + frame_pop .endif ret @@ -466,8 +466,7 @@ CPU_LE( ext v7.16b, v7.16b, v7.16b, #8 ) // Assumes len >= 16. // SYM_FUNC_START(crc_t10dif_pmull_p8) - stp x29, x30, [sp, #-16]! - mov x29, sp + frame_push 1 crc_t10dif_pmull p8 SYM_FUNC_END(crc_t10dif_pmull_p8)