From patchwork Wed May 15 09:27:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 2570931 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 4221E3FDBC for ; Wed, 15 May 2013 09:27:46 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UcXzr-0008U5-CC; Wed, 15 May 2013 09:27:43 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UcXzo-0003Yx-An; Wed, 15 May 2013 09:27:40 +0000 Received: from mail-we0-x22f.google.com ([2a00:1450:400c:c03::22f]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UcXzl-0003YY-7A for linux-arm-kernel@lists.infradead.org; Wed, 15 May 2013 09:27:38 +0000 Received: by mail-we0-f175.google.com with SMTP id p59so124183wes.34 for ; Wed, 15 May 2013 02:27:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=cMT4uyLsxH5qJsRq9RP+gUZ5ZhPEEFoWjgiID5mTzdo=; b=ILGAff+QF6bpiIr3g/oXEvBVlLQGotaGFEatx0WwxXbAARTWCiaUMyWHdrKwsnXyyb kvUux5t25sZeCS8qMg1X71Ca8po3iukNyvqDaywuN1iqd7HRwKLab38/E8XA+bWgwvvT iMRPmgOXJhAxI/+6uRXs/wPNCBPGIk+Vg1PZefkLALMoERcNG/MuBVkro+drwdGMNWnn +RT9Uy03N0PehfdIUiAojQEHqFma9adTBqjmp+hbMK+gkT9V4ofQySmwOPV6JV4gb00w BU2S/0tpBOXE4/tgHohwOc23ebgc9R4MipqANQbYjq+q/LAg6S/kdeqsUwqshv6gVXNx c6UQ== X-Received: by 10.180.37.243 with SMTP id b19mr13135529wik.12.1368610034613; Wed, 15 May 2013 02:27:14 -0700 (PDT) Received: from ards-mac-mini.local (cag06-7-83-153-85-71.fbx.proxad.net. [83.153.85.71]) by mx.google.com with ESMTPSA id dj7sm26833479wib.6.2013.05.15.02.27.12 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 15 May 2013 02:27:13 -0700 (PDT) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: crypto: sha1-armv4-large.S: fix SP handling Date: Wed, 15 May 2013 11:27:00 +0200 Message-Id: <1368610020-29219-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.1.2 X-Gm-Message-State: ALoCoQkUkwZU8CsFjOV5pCfXx4d7rbIUnpm+OfMw5CuQ0CbOoRn9VE/MYBMWN3gkfWJkWlMEKveN X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130515_052737_370547_19F27690 X-CRM114-Status: UNSURE ( 8.47 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: nicolas.pitre@linaro.org, linus.walleij@linaro.org, Ard Biesheuvel , appro@openssl.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Make the SHA1 asm code ABI conformant by making sure all stack accesses occur above the stack pointer. Origin: http://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=1a9d60d2 Signed-off-by: Ard Biesheuvel Acked-by: Nicolas Pitre --- arch/arm/crypto/sha1-armv4-large.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/crypto/sha1-armv4-large.S b/arch/arm/crypto/sha1-armv4-large.S index 92c6eed..99207c4 100644 --- a/arch/arm/crypto/sha1-armv4-large.S +++ b/arch/arm/crypto/sha1-armv4-large.S @@ -195,6 +195,7 @@ ENTRY(sha1_block_data_order) add r3,r3,r10 @ E+=F_00_19(B,C,D) cmp r14,sp bne .L_00_15 @ [((11+4)*5+2)*3] + sub sp,sp,#25*4 #if __ARM_ARCH__<7 ldrb r10,[r1,#2] ldrb r9,[r1,#3] @@ -290,7 +291,6 @@ ENTRY(sha1_block_data_order) add r3,r3,r10 @ E+=F_00_19(B,C,D) ldr r8,.LK_20_39 @ [+15+16*4] - sub sp,sp,#25*4 cmn sp,#0 @ [+3], clear carry to denote 20_39 .L_20_39_or_60_79: ldr r9,[r14,#15*4]