From patchwork Tue Sep 17 08:50:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 173882 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp847440ill; Tue, 17 Sep 2019 01:50:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsRV3LmX26S7/ZRGyeriTGbGtdB02Ivj2suJA+xcI7T4fWraxP2vUmMG2Nlh4UpNN9RRo0 X-Received: by 2002:aa7:d607:: with SMTP id c7mr3484780edr.286.1568710224274; Tue, 17 Sep 2019 01:50:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568710224; cv=none; d=google.com; s=arc-20160816; b=XoTona8rimfQ8nXIahFNuVwcUSLKwj/AWWZ1q+7umDUuPMk36hYjKerbHYwUGR0Zy8 D8zGkwJau52UjYZRw7F3cpiLmDvtn7avXzAnbep5I0boDFmPNSahYfJxculI55jVMhBp S7ZGtpN7U/czvkcuLWmNbFUTzD4s/7SD7imijDmPylLiyZAeHBWKVhQSVjomvCgDegg8 VxOnjWojp0b6qQmmZygEMWbsO7hzvLoRJudzILUCy6TW7H5m4PoU9Pkhj+g0exbO8BrK eh0isbyk7NiGRhYKcd8CVm/3gf3yjq7wH2NyrxRXAszSPtyMN5Ra4qb0F7kSn+LGj6AK r1Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=zTWR43FDou9WAzRxjbQnIKVbh9jsI3YAGJPVast+jI8=; b=fy8VYdlUC/WIbuy2yH5NLqsXMY1VkZsF31JdY4haegR4zT1RsN32wDuxWeBnbHFkYU zvEjqz2xfQ5teRAckBwX42TX29cbHD9CDNrgU29AKoaVIzLa/8dUrGxCHxJb6+2czmYN NxIp/IkC3eNwaJ8w6mSoDa4y5I8DGgntbqq4MDK0s0SDEjyQx8KiopofamWL18cr2kGs C8lMFfPFDkuN6cu3GAHXX6U3rpZsh6KTaGvNfrgqnyly7g+nWOaMTa4Q424M8HFanTZK 3BNsiVFiXukJ3F61PD/9mwk7HrzitGkC8zVXuJ+QvrEDKoWS/MDAqCCUcfymTr/Zwbu9 JCTw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12si1025995edk.16.2019.09.17.01.50.24; Tue, 17 Sep 2019 01:50:24 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389207AbfIQIuT (ORCPT + 3 others); Tue, 17 Sep 2019 04:50:19 -0400 Received: from foss.arm.com ([217.140.110.172]:53120 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389188AbfIQIuT (ORCPT ); Tue, 17 Sep 2019 04:50:19 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BD84E28; Tue, 17 Sep 2019 01:50:18 -0700 (PDT) Received: from e111045-lin.cambridge.arm.com (e120756.arm.com [10.1.39.60]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2C4B63F575; Tue, 17 Sep 2019 01:50:18 -0700 (PDT) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, Ard Biesheuvel Subject: [PATCH 1/2] crypto: arm/aes-ce - build for v8 architecture explicitly Date: Tue, 17 Sep 2019 09:50:00 +0100 Message-Id: <20190917085001.792-1-ard.biesheuvel@arm.com> X-Mailer: git-send-email 2.17.1 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Ard Biesheuvel The NEON/Crypto Extensions based AES implementation for 32-bit ARM can be built in a kernel that targets ARMv6 CPUs and higher, even though the actual code will not be able to run on that generation, but it allows for a portable image to be generated that can will use the special instructions only when they are available. Since those instructions are part of a FPU profile rather than a CPU profile, we don't override the architecture in the assembler code, and most of the scalar code is simple enough to be ARMv6 compatible. However, that changes with commit c61b1607ed4fbbf2, which introduces calls to the movw/movt instructions, which are v7+ only. So override the architecture in the .S file to armv8-a, which matches the architecture specification in the crypto-neon-fp-armv8 FPU specificier that we already using. Note that using armv7-a here may trigger an issue with the upcoming Clang 10 release, which no longer permits .arch/.fpu combinations it views as incompatible. Reported-by: kbuild test robot Fixes: c61b1607ed4fbbf2("crypto: arm/aes-ce - implement ciphertext stealing ...") Signed-off-by: Ard Biesheuvel --- arch/arm/crypto/aes-ce-core.S | 1 + 1 file changed, 1 insertion(+) -- 2.17.1 diff --git a/arch/arm/crypto/aes-ce-core.S b/arch/arm/crypto/aes-ce-core.S index b978cdf133af..4d1707388d94 100644 --- a/arch/arm/crypto/aes-ce-core.S +++ b/arch/arm/crypto/aes-ce-core.S @@ -9,6 +9,7 @@ #include .text + .arch armv8-a .fpu crypto-neon-fp-armv8 .align 3