From patchwork Wed Oct 2 07:54:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 174955 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp421430ill; Wed, 2 Oct 2019 00:55:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqyMIxzyuLDDsGwPVfJAbFIUj+zznveKzGOjF+6z0RiEQIH+7NI0bkglGfi1UrkEjaYCK0qP X-Received: by 2002:a17:906:1a08:: with SMTP id i8mr1864371ejf.231.1570002921738; Wed, 02 Oct 2019 00:55:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570002921; cv=none; d=google.com; s=arc-20160816; b=GSOLizSelNloDmFJQXOY9nVPN+YwwRLz9xsqNjADaHmBFKlulsCsH7c3npAdTMW1DS cSn6HaTwqJrKea2qqCsCIdxb8sTllLR+TWxXLIxA3QBCnTGBNBGLP/QmajlFqKk0pv0O DllRCI1uRJj0NKUTBR47NqtmalkXqJzF6B9JU/TrCj2xDDCBt/fwd8O6WYGDjJv5JYQg b678m8ZfYV63KW69gRYIlrEZ5yh6LvnkEXN3g59G2Ol23wLnbwz6Bn7HISWqHXjeolJs 0ZbPi1ALwW7CXPjGOiafptg8hoH62BiUXM4UEElWTPmEG/Os1ard5CabIxrUt0Ydwdx1 EKCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=A8XGPQpdTard1ApbywwLwIjfjiFlJGx3ALBeAc9ozt4=; b=TrmTP8uvWPBi6RiHXPoNjvnxCi1rdkMLXx0Zr8HS7mthPeCnfF6p+SygHP0bvMO+fw 3xHANthN9bis7gUwIDumEAJmToHFiObsV6dAEPVeVVAWThHd6sDnRHoJPOz88ehvjzN2 l1ld59ZWdj97XRKz8zNfVIr2tnZj/DFzX9uMwZaWGcEcp0UyBIIoe6zITIPLxuOpNECQ olp+ZluZUcxK/oTzYpsuC61qbZnVtDONFXyX/sOUAS4l3Q56yCL26x/tSIofB4K9Wdxv kS+UoTr2GtBurB14DKbALbSuSKqQO8yXXhUyVj1AVVzNHvE2740FgdNBmjG0TLmnS4dL HKyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Dx6Uturi; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y23si11395844edb.208.2019.10.02.00.55.21; Wed, 02 Oct 2019 00:55:21 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Dx6Uturi; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727127AbfJBHzS (ORCPT + 3 others); Wed, 2 Oct 2019 03:55:18 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:46374 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725852AbfJBHzR (ORCPT ); Wed, 2 Oct 2019 03:55:17 -0400 Received: by mail-wr1-f68.google.com with SMTP id o18so18387981wrv.13 for ; Wed, 02 Oct 2019 00:55:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=A8XGPQpdTard1ApbywwLwIjfjiFlJGx3ALBeAc9ozt4=; b=Dx6UturiW0NJ9L4H3toluQCphAT9eUOfVqQQnns7QawoVdH+XCyg+J9ZKT5g7QRUUi FMrpeHzNE1EgnbvsuiqV8MSA2NspM+GqDRXsxJ9z0qeXHXtotHPyItF9JJbjqduCt9QO kmcLK7bnVeubXabuhjQ0vz6C8M0WDiE+WPfqrlnFPAsKZwj5ZNjhpL6BZnZjjse8OpGT c9xy69+e9Cy88mCCfllS2MD0XysysItECDVIZdFmBbLwPQ7gNibO2QlEzR5pTom7kkZa AYu9VXZw1IoCp0josxWXB7vFDEg9EL+oWmriwqtfVWXFkGna5DC7yvamQm8qQD6e8gNm kA5A== 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:mime-version :content-transfer-encoding; bh=A8XGPQpdTard1ApbywwLwIjfjiFlJGx3ALBeAc9ozt4=; b=JsJ1HNvNuhuOO0eGqlCRXbVrZyHuyHAAjvxW/DsoZ3kMAuOKxOVvPda94KGd9jarBV ZHro9pApn3qwDqUYYJXX/6+V+VpcU+D1ti1b2gM12dUE03pdQo31u5ogQ7Bgqjta56j/ QKkN9/hnHvrrYMnSTYfM96b9qr3tPj6PAYaPuG0uBs1T3gybcIcbzX1gosLG3UGgI0NJ Ib3/TNA0Qs4lbx73wUDIkpoePyBiSLC6qRbcbqiJBxRlCU6timnXHPHnPbHZx5a3qkfO luWvP+R/8LYeLTzcXcWz8F3wb/3QlDzVj0AEsOdRT6z14YkTUHAWqnXHqckSMJ69RMro 1wXw== X-Gm-Message-State: APjAAAW9lDIWHisszqh7aiuGogY+vwJrPfrwDILcHWNu2RhihiIjk7sb 8O0Y7fP2U8FYPMNm1v6OOw0wbJ6N4TvZSs46 X-Received: by 2002:a5d:6885:: with SMTP id h5mr1575256wru.92.1570002915785; Wed, 02 Oct 2019 00:55:15 -0700 (PDT) Received: from sudo.home ([2a01:cb1d:112:6f00:1d6f:6259:a948:207b]) by smtp.gmail.com with ESMTPSA id s1sm24942360wrg.80.2019.10.02.00.55.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Oct 2019 00:55:14 -0700 (PDT) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, arnd@arndb.de, natechancellor@gmail.com, ndesaulniers@google.com, Ard Biesheuvel Subject: [PATCH] crypto: aegis128/simd - build 32-bit ARM for v8 architecture explicitly Date: Wed, 2 Oct 2019 09:54:48 +0200 Message-Id: <20191002075448.6453-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Now that the Clang compiler has taken it upon itself to police the compiler command line, and reject combinations for arguments it views as incompatible, the AEGIS128 no longer builds correctly, and errors out like this: clang-10: warning: ignoring extension 'crypto' because the 'armv7-a' architecture does not support it [-Winvalid-command-line-argument] So let's switch to armv8-a instead, which matches the crypto-neon-fp-armv8 FPU profile we specify. Since neither were actually supported by GCC versions before 4.8, let's tighten the Kconfig dependencies as well so we won't run into errors when building with an ancient compiler. Signed-off-by: Ard Biesheuvel --- crypto/Kconfig | 1 + crypto/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- 2.20.1 Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Reported-by: diff --git a/crypto/Kconfig b/crypto/Kconfig index e928f88b6206..b138b68329dc 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -331,6 +331,7 @@ config CRYPTO_AEGIS128 config CRYPTO_AEGIS128_SIMD bool "Support SIMD acceleration for AEGIS-128" depends on CRYPTO_AEGIS128 && ((ARM || ARM64) && KERNEL_MODE_NEON) + depends on !ARM || CC_IS_CLANG || GCC_VERSION >= 40800 default y config CRYPTO_AEGIS128_AESNI_SSE2 diff --git a/crypto/Makefile b/crypto/Makefile index fcb1ee679782..aa740c8492b9 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -93,7 +93,7 @@ obj-$(CONFIG_CRYPTO_AEGIS128) += aegis128.o aegis128-y := aegis128-core.o ifeq ($(ARCH),arm) -CFLAGS_aegis128-neon-inner.o += -ffreestanding -march=armv7-a -mfloat-abi=softfp +CFLAGS_aegis128-neon-inner.o += -ffreestanding -march=armv8-a -mfloat-abi=softfp CFLAGS_aegis128-neon-inner.o += -mfpu=crypto-neon-fp-armv8 aegis128-$(CONFIG_CRYPTO_AEGIS128_SIMD) += aegis128-neon.o aegis128-neon-inner.o endif