Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5113973ybe; Tue, 17 Sep 2019 02:52:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqxUa0L6yvfS9U/0Nm3eN02+RRPZbmdK5SIDgjWMRTwiDvPQj7fdnTNdGWr7zkS7bTwfTgBh X-Received: by 2002:a17:906:48d4:: with SMTP id d20mr3938853ejt.84.1568713972574; Tue, 17 Sep 2019 02:52:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568713972; cv=none; d=google.com; s=arc-20160816; b=hsOwe12qJjgMJ7QilGcMOkgcXrjP710UkGLtbsl3fHMao+kVFI7hGlRNit1XNWSsfm xOAS5ORQdsPmhrGVzu2txIhN4Nfzvta98xZRtuhc5tmg7dyzQKd8K7nAnneyZFNT9bff bLwMudkRIEUi3sMl2uCnFN3ncOGczu74R4tVKqgJuvvKwu8ZQTHMHg5V1uTzPNj+Gjaw Utm5KV9QjcmKx0myeBEzTxDISVHqCMdV/qs5kva4YxHdRemu88e+UdFSmltXUGCI0KOo N2i3ylQAQyOK4FjkHT7dBUiXKQSAst5/LB+9LIgCZ58ki/E1TFZe91IaYIkLZt7abRYs FE2g== 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 u6si918399eds.173.2019.09.17.02.52.25; Tue, 17 Sep 2019 02:52:52 -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 + 99 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(+) 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 -- 2.17.1