From patchwork Mon May 21 19:41:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?T25kcmVqIE1vc27DocSNZWs=?= X-Patchwork-Id: 10416245 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E36F66053B for ; Mon, 21 May 2018 19:42:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE3B228A04 for ; Mon, 21 May 2018 19:42:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CAAF228A14; Mon, 21 May 2018 19:42:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4266728A0D for ; Mon, 21 May 2018 19:42:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751128AbeEUTmH (ORCPT ); Mon, 21 May 2018 15:42:07 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:52878 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751039AbeEUTmG (ORCPT ); Mon, 21 May 2018 15:42:06 -0400 Received: by mail-wm0-f65.google.com with SMTP id w194-v6so27038763wmf.2 for ; Mon, 21 May 2018 12:42:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Mw3qWMRtrsZQ4X73ei1ZFjYWJ6o3HQ992KcqMWGpXnU=; b=WBuFvgzPL65QieG5OjqQ9Ubl+S7UCyeVADxETCQKviLG4SzatnbphOF9q7gyxMC3qI FAiuPU/2Yi0ftse62t0GQUjgUvdQYndaOws1sb/rS2nrSFvLynmtv7PdOlhCcN62LFC4 XX6dxZmiDyUvwNA+67UueI3Rb0gIQDIzbAaaFGcYd+6El5+b1G6lxgsM7IBjrMGXD44D NxZtC/HfkmPcUDjHvyth7xzAyxSQQvY4K3jFAAfUeg95xXVv5co1iHmT8saeNNSV6Z5C UhqqH16syh9OyJ7h+zteXBfiWaWOkTp4X6ERwL0eNy3WlWSdFlGwTXv8RlrUmGvUSBgn Q55Q== 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=Mw3qWMRtrsZQ4X73ei1ZFjYWJ6o3HQ992KcqMWGpXnU=; b=CbSggpJOFgHDTpDmZjnr9kT83lKc1S8T3d4K3qPmzJ8iMV1O+9jGervAO57vrwccmx 7fiDJC2hwkbZIiIvhZ6zsEcscb5CIaj0Uo9S9XOzC4jryUZwhyukJv+cX1N8XTl92Lxj /3aYB5J2f3eFQzidFzoUUWlGhEUOq/Uny0ZR1NMf6D1KUT1cJaR+SMgs01zSXmiBVqkc L3XjcZ1Ksik9j1iCuw/ErRufQOsodQZnpOtOmkjjSh/4GsnRXIZ51i7GiFnZcYf84uw6 xe3SI0k+P1dpVOojlPA0FHS/yioIZwoC7szOkHwLmIXvLxVu0FpELtCpoO1K7dhv38Jb XuEA== X-Gm-Message-State: ALKqPwdwq08s3Q6yB9ZUhsjPKmWiqnGY/HyRnI0og/W/umBN1yV5jGus oP4FZ/S3MESfZmjVp3pNn22bYg== X-Google-Smtp-Source: AB8JxZpLoyvyG8Ux9/WkESEdSVpiL89Ex58APAIGugV78z6SM2vsPMODptt7aPAfgfQrWFhUIQDkfA== X-Received: by 2002:a1c:1a49:: with SMTP id a70-v6mr118731wma.77.1526931725155; Mon, 21 May 2018 12:42:05 -0700 (PDT) Received: from omosnacek-acer.redhat.com ([2a02:8308:b041:e600:4cb8:1a0a:3a18:e961]) by smtp.gmail.com with ESMTPSA id x65-v6sm22292661wme.31.2018.05.21.12.42.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 May 2018 12:42:04 -0700 (PDT) From: =?UTF-8?q?Ondrej=20Mosn=C3=A1=C4=8Dek?= To: linux-crypto@vger.kernel.org Cc: Herbert Xu , Milan Broz , Ondrej Mosnacek Subject: [PATCH v2] crypto: Mark MORUS SIMD glue as x86-specific Date: Mon, 21 May 2018 21:41:51 +0200 Message-Id: <20180521194151.24692-1-omosnacek@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ondrej Mosnacek Commit 56e8e57fc3a7 ("crypto: morus - Add common SIMD glue code for MORUS") accidetally consiedered the glue code to be usable by different architectures, but it seems to be only usable on x86. This patch moves it under arch/x86/crypto and adds 'depends on X86' to the Kconfig options and also removes the prompt to hide these internal options from the user. Reported-by: kbuild test robot Signed-off-by: Ondrej Mosnacek --- arch/x86/crypto/Makefile | 3 +++ {crypto => arch/x86/crypto}/morus1280_glue.c | 4 ++-- {crypto => arch/x86/crypto}/morus640_glue.c | 4 ++-- crypto/Kconfig | 6 ++++-- crypto/Makefile | 2 -- 5 files changed, 11 insertions(+), 8 deletions(-) rename {crypto => arch/x86/crypto}/morus1280_glue.c (98%) rename {crypto => arch/x86/crypto}/morus640_glue.c (98%) diff --git a/arch/x86/crypto/Makefile b/arch/x86/crypto/Makefile index 3813e7cdaada..48e731d782e9 100644 --- a/arch/x86/crypto/Makefile +++ b/arch/x86/crypto/Makefile @@ -42,6 +42,9 @@ obj-$(CONFIG_CRYPTO_AEGIS128_AESNI_SSE2) += aegis128-aesni.o obj-$(CONFIG_CRYPTO_AEGIS128L_AESNI_SSE2) += aegis128l-aesni.o obj-$(CONFIG_CRYPTO_AEGIS256_AESNI_SSE2) += aegis256-aesni.o +obj-$(CONFIG_CRYPTO_MORUS640_GLUE) += morus640_glue.o +obj-$(CONFIG_CRYPTO_MORUS1280_GLUE) += morus1280_glue.o + obj-$(CONFIG_CRYPTO_MORUS640_SSE2) += morus640-sse2.o obj-$(CONFIG_CRYPTO_MORUS1280_SSE2) += morus1280-sse2.o diff --git a/crypto/morus1280_glue.c b/arch/x86/crypto/morus1280_glue.c similarity index 98% rename from crypto/morus1280_glue.c rename to arch/x86/crypto/morus1280_glue.c index ce1e5c34b09d..0dccdda1eb3a 100644 --- a/crypto/morus1280_glue.c +++ b/arch/x86/crypto/morus1280_glue.c @@ -1,6 +1,6 @@ /* * The MORUS-1280 Authenticated-Encryption Algorithm - * Common glue skeleton + * Common x86 SIMD glue skeleton * * Copyright (c) 2016-2018 Ondrej Mosnacek * Copyright (C) 2017-2018 Red Hat, Inc. All rights reserved. @@ -299,4 +299,4 @@ EXPORT_SYMBOL_GPL(cryptd_morus1280_glue_exit_tfm); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Ondrej Mosnacek "); -MODULE_DESCRIPTION("MORUS-1280 AEAD mode -- glue for optimizations"); +MODULE_DESCRIPTION("MORUS-1280 AEAD mode -- glue for x86 optimizations"); diff --git a/crypto/morus640_glue.c b/arch/x86/crypto/morus640_glue.c similarity index 98% rename from crypto/morus640_glue.c rename to arch/x86/crypto/morus640_glue.c index c7e788cfaa29..7b58fe4d9bd1 100644 --- a/crypto/morus640_glue.c +++ b/arch/x86/crypto/morus640_glue.c @@ -1,6 +1,6 @@ /* * The MORUS-640 Authenticated-Encryption Algorithm - * Common glue skeleton + * Common x86 SIMD glue skeleton * * Copyright (c) 2016-2018 Ondrej Mosnacek * Copyright (C) 2017-2018 Red Hat, Inc. All rights reserved. @@ -295,4 +295,4 @@ EXPORT_SYMBOL_GPL(cryptd_morus640_glue_exit_tfm); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Ondrej Mosnacek "); -MODULE_DESCRIPTION("MORUS-640 AEAD mode -- glue for optimizations"); +MODULE_DESCRIPTION("MORUS-640 AEAD mode -- glue for x86 optimizations"); diff --git a/crypto/Kconfig b/crypto/Kconfig index 75f5efde9aa3..30d54a56e64a 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -341,7 +341,8 @@ config CRYPTO_MORUS640 Support for the MORUS-640 dedicated AEAD algorithm. config CRYPTO_MORUS640_GLUE - tristate "MORUS-640 AEAD algorithm (glue for SIMD optimizations)" + tristate + depends on X86 select CRYPTO_AEAD select CRYPTO_CRYPTD help @@ -363,7 +364,8 @@ config CRYPTO_MORUS1280 Support for the MORUS-1280 dedicated AEAD algorithm. config CRYPTO_MORUS1280_GLUE - tristate "MORUS-1280 AEAD algorithm (glue for SIMD optimizations)" + tristate + depends on X86 select CRYPTO_AEAD select CRYPTO_CRYPTD help diff --git a/crypto/Makefile b/crypto/Makefile index 68a7c546460a..6d1d40eeb964 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -91,8 +91,6 @@ obj-$(CONFIG_CRYPTO_AEGIS128L) += aegis128l.o obj-$(CONFIG_CRYPTO_AEGIS256) += aegis256.o obj-$(CONFIG_CRYPTO_MORUS640) += morus640.o obj-$(CONFIG_CRYPTO_MORUS1280) += morus1280.o -obj-$(CONFIG_CRYPTO_MORUS640_GLUE) += morus640_glue.o -obj-$(CONFIG_CRYPTO_MORUS1280_GLUE) += morus1280_glue.o obj-$(CONFIG_CRYPTO_PCRYPT) += pcrypt.o obj-$(CONFIG_CRYPTO_CRYPTD) += cryptd.o obj-$(CONFIG_CRYPTO_MCRYPTD) += mcryptd.o