From patchwork Thu Jan 19 12:23:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 91869 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp249109qgi; Thu, 19 Jan 2017 04:24:05 -0800 (PST) X-Received: by 10.84.206.37 with SMTP id f34mr12914131ple.35.1484828645439; Thu, 19 Jan 2017 04:24:05 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z19si3388984pgj.173.2017.01.19.04.24.05; Thu, 19 Jan 2017 04:24:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751970AbdASMYC (ORCPT + 1 other); Thu, 19 Jan 2017 07:24:02 -0500 Received: from mail-wm0-f54.google.com ([74.125.82.54]:36659 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752194AbdASMYC (ORCPT ); Thu, 19 Jan 2017 07:24:02 -0500 Received: by mail-wm0-f54.google.com with SMTP id c85so286278309wmi.1 for ; Thu, 19 Jan 2017 04:23:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=CO68TTqkZiZ457U1q0Y1/QF0BvJ0F/4IY3yoEWUOwsM=; b=S1a/BfEC9GLSCFaOrJOZUQv4iBxu1Qr9KFi1K00LPYGItW8LHqQi2hTUMEAQ7s5I+i n+Dls1YSUAgzuY8Jj4GJCW1l7KH6hG1GbG9+Y4dwZPYki7bONfwuuD0Um7gtB8pfKosO BnYXtQccywcEw9s2a+ImPHQOVsbdpV+cZFG1o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=CO68TTqkZiZ457U1q0Y1/QF0BvJ0F/4IY3yoEWUOwsM=; b=eYbD7g1i5Zy6byfeszvW3T9UIRe+ZSeyA18Wu5geZGteq+0zYT7+WxBJpf04iNxgr/ 7LZD4M6HkRwS8KBxonCJQbZdHXdm78TMQKO8RqKHB6AiRSavSOT66jcwLpIW6qPdgJWJ Iox/JGWWRsENiD6H8YJx6/7sfd5OHchh6YYwvYWrk7qZIP4L2FRkWOOiHsM578VYzUk8 DOId7/obtYNaod2m0b3IjuQLSO8liA3nSeUqVQt5qDe15eisZ7es+SoXUcFyx9SPUXgy bQYecLDsXh+l2Yb7zviMs6Qi0hI/T83PppFZMMqgH0hjQeOXLxPXLMkLmHkDeY3GFvTi tS3g== X-Gm-Message-State: AIkVDXIuUOuN6kT4P9pv5C0fMAmsm4K12/IpL8mIAMawWeeI/l547r4tUye6Nt+kQ0rFKqVM X-Received: by 10.28.62.144 with SMTP id l138mr6566427wma.50.1484828617091; Thu, 19 Jan 2017 04:23:37 -0800 (PST) Received: from localhost.localdomain ([160.167.203.25]) by smtp.gmail.com with ESMTPSA id 202sm12454314wmp.20.2017.01.19.04.23.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Jan 2017 04:23:36 -0800 (PST) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au Cc: arnd@arndb.de, paul.gortmaker@windriver.com, Ard Biesheuvel Subject: [PATCH] crypto: arm/aes-neonbs - fix issue with v2.22 and older assembler Date: Thu, 19 Jan 2017 12:23:32 +0000 Message-Id: <1484828612-18956-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org The GNU assembler for ARM version 2.22 or older fails to infer the element size from the vmov instructions, and aborts the build in the following way; .../aes-neonbs-core.S: Assembler messages: .../aes-neonbs-core.S:817: Error: bad type for scalar -- `vmov q1h[1],r10' .../aes-neonbs-core.S:817: Error: bad type for scalar -- `vmov q1h[0],r9' .../aes-neonbs-core.S:817: Error: bad type for scalar -- `vmov q1l[1],r8' .../aes-neonbs-core.S:817: Error: bad type for scalar -- `vmov q1l[0],r7' .../aes-neonbs-core.S:818: Error: bad type for scalar -- `vmov q2h[1],r10' .../aes-neonbs-core.S:818: Error: bad type for scalar -- `vmov q2h[0],r9' .../aes-neonbs-core.S:818: Error: bad type for scalar -- `vmov q2l[1],r8' .../aes-neonbs-core.S:818: Error: bad type for scalar -- `vmov q2l[0],r7' Fix this by setting the element size explicitly, by replacing vmov with vmov.32. Signed-off-by: Ard Biesheuvel --- Please add to the cryptodev-2.6 queue for v4.11 arch/arm/crypto/aes-neonbs-core.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/crypto/aes-neonbs-core.S b/arch/arm/crypto/aes-neonbs-core.S index c9477044fbba..12da247164d1 100644 --- a/arch/arm/crypto/aes-neonbs-core.S +++ b/arch/arm/crypto/aes-neonbs-core.S @@ -766,13 +766,13 @@ ENTRY(aesbs_cbc_decrypt) ENDPROC(aesbs_cbc_decrypt) .macro next_ctr, q - vmov \q\()h[1], r10 + vmov.32 \q\()h[1], r10 adds r10, r10, #1 - vmov \q\()h[0], r9 + vmov.32 \q\()h[0], r9 adcs r9, r9, #0 - vmov \q\()l[1], r8 + vmov.32 \q\()l[1], r8 adcs r8, r8, #0 - vmov \q\()l[0], r7 + vmov.32 \q\()l[0], r7 adc r7, r7, #0 vrev32.8 \q, \q .endm