From patchwork Thu Oct 17 19:08:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 176699 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1359242ill; Thu, 17 Oct 2019 12:09:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8co54HKMFwtbMOVR7nmN1bqiHcL22ayTm6Kqyakn7L6TVD4GsKx8T1DI0nl5GQUU1+Exu X-Received: by 2002:a17:906:6011:: with SMTP id o17mr4885234ejj.172.1571339396434; Thu, 17 Oct 2019 12:09:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571339396; cv=none; d=google.com; s=arc-20160816; b=Tk49kFS51CuNblgrXiIgJJIBGdHljHI5cq1vjtlMi6It78++G3zt0d2IUJ/cEp3+ki fjKs1x9b49oJx2C+/tG5FzU8edUQNixZ/44/9E1tx5kMdiVUK1JKrJcGz29D/UBXXv6O W2NURfomXCM8BTAEuSqZ9tRr4knFJAmxGhloGvrDHBac6GQFLE6a5gQOMK3Qvn+5qqhK P2XrRYYJF6BA0xAtnL4udWxvVABvYbDmxx0Exthpir5Rcj4EFkUua+ajGh9Tma2ueq3w aei+IW8PidCKcWToPvMejFLQD4uF3HgVccNsfXKsbr+K9uarGOIk6ZmuN4VxfNoGj5KR J+Rg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Fj7GaQEHFwPReN2e0aPWrIe6zr5UF/KrFtareX92kMM=; b=viL6wSqE7PrKB3cq0L9bJlPGQLuX5VgvE/MoSSdeSt40sF3VRla/6m8eheJXSW1MfC fZ6uf0pq5AM02FXqiVTgn3PwWYJG0oABUhTbUxYtw84mSviTbCRVY5clsXZFbOxoA0Dw T/zrAHrwQokZyF9OOTJQI9X57AAgzHPLMdkorpGSv2350OAhTrCy54mNiufICZ8djhqc 02+kmaMGHOA7iQoqag0fgcBx8dDubQps5RhE/Fw7AWWjS/uXSiTK5UNYw4487v7ST1WM vDFycyiNfcT19bV6MKo7F9jSsFDO3T8NvML9iokRN/izx80c+qC0Nd+Sqb5amgUE8nAG YmYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TSKdUI0M; 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 e31si2292605ede.199.2019.10.17.12.09.55; Thu, 17 Oct 2019 12:09:56 -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=TSKdUI0M; 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 S2441359AbfJQTJy (ORCPT + 3 others); Thu, 17 Oct 2019 15:09:54 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:36630 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439259AbfJQTJx (ORCPT ); Thu, 17 Oct 2019 15:09:53 -0400 Received: by mail-wm1-f65.google.com with SMTP id m18so3689515wmc.1 for ; Thu, 17 Oct 2019 12:09:52 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=Fj7GaQEHFwPReN2e0aPWrIe6zr5UF/KrFtareX92kMM=; b=TSKdUI0MuWjqMwXgG8gASCaSHEboRkLURjeiaGdz4+eFKtdh9t8RGtRlsGYv6gTSaF BEvSjHI8/sC+Vlg2Ut4Up9UZ4RZSx31Ni17Ck88VyB/8yUY4fv4pl6KRdyGHtqDNdMAm DEZzbjpkHDqayq59nTy0H7YM93fX5KaZTU1JsyoVUpYBgetIZp+b1SCIBuWedLIJLPYN f3NtHLz7KaEsMaLuyKpREV6Z875N8PzkTXw3H2avAW7e4WAU9LvHZgMUW0op0clhsMvH Fa2Df4fdHTAcdCOfCg5k//jk/eTnk5bHGD5QXfuvtdmlBb51tNsqHsc83TSUWHpeDmya LgDg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=Fj7GaQEHFwPReN2e0aPWrIe6zr5UF/KrFtareX92kMM=; b=NqxSmIM5xHkMKaIWSWjbC7RU5upzWgTYEwc2+xRd1MCvKDNZ1f/AmDb9g5+sp4OHT+ gSFOLty8L9/JHCVLZd1QFdO9vsDsqO3l7AK8tMZoTI+Hs6YSm8q/bvGYxRl9ePR6lDGA BZqAl4zO+3kY72vEKLqfJG1L4f5gXAQWu/1i7otEpWJzjIpS3kdadJ6VKOE9arw0H5LN QXwOB7E8bQ6sm1pDSGZcsNLvmRTM9eAtLS3cQsN+Wcno15mpqjvhuCUojCuxQP0iWsar rUTIDJMBsz1B/mJvZnt7Yw+0EX+v6v70HFz3NTMYMypW2W7dWuK280twdH72Kbdq6sss g+hg== X-Gm-Message-State: APjAAAU8XnWNP5QwL65g6+4ZtPS6jPYAie1Gmzg7lqpEukRY2RCxkv/M BfQc8mbdwWDmx0wqemIx4bSsPpKEBDGjlqYw X-Received: by 2002:a1c:a608:: with SMTP id p8mr4083979wme.25.1571339391328; Thu, 17 Oct 2019 12:09:51 -0700 (PDT) Received: from sudo.home ([2a01:cb1d:112:6f00:ccb6:e9d4:c1bc:d107]) by smtp.gmail.com with ESMTPSA id y3sm5124528wro.36.2019.10.17.12.09.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Oct 2019 12:09:50 -0700 (PDT) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: Ard Biesheuvel , Herbert Xu , David Miller , "Jason A . Donenfeld" , Samuel Neves , Arnd Bergmann , Eric Biggers , Andy Lutomirski , Martin Willi , Rene van Dorst , David Sterba Subject: [PATCH v4 01/35] crypto: tidy up lib/crypto Kconfig and Makefile Date: Thu, 17 Oct 2019 21:08:58 +0200 Message-Id: <20191017190932.1947-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191017190932.1947-1-ard.biesheuvel@linaro.org> References: <20191017190932.1947-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org In preparation of introducing a set of crypto library interfaces, tidy up the Makefile and split off the Kconfig symbols into a separate file. Signed-off-by: Ard Biesheuvel --- crypto/Kconfig | 13 +------------ lib/crypto/Kconfig | 15 +++++++++++++++ lib/crypto/Makefile | 16 ++++++++-------- 3 files changed, 24 insertions(+), 20 deletions(-) -- 2.20.1 diff --git a/crypto/Kconfig b/crypto/Kconfig index 29472fb795f3..70b4f7b238fc 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -878,9 +878,6 @@ config CRYPTO_SHA1_PPC_SPE SHA-1 secure hash standard (DFIPS 180-4) implemented using powerpc SPE SIMD instruction set. -config CRYPTO_LIB_SHA256 - tristate - config CRYPTO_SHA256 tristate "SHA224 and SHA256 digest algorithm" select CRYPTO_HASH @@ -1019,9 +1016,6 @@ config CRYPTO_GHASH_CLMUL_NI_INTEL comment "Ciphers" -config CRYPTO_LIB_AES - tristate - config CRYPTO_AES tristate "AES cipher algorithms" select CRYPTO_ALGAPI @@ -1150,9 +1144,6 @@ config CRYPTO_ANUBIS -config CRYPTO_LIB_ARC4 - tristate - config CRYPTO_ARC4 tristate "ARC4 cipher algorithm" select CRYPTO_BLKCIPHER @@ -1339,9 +1330,6 @@ config CRYPTO_CAST6_AVX_X86_64 This module provides the Cast6 cipher algorithm that processes eight blocks parallel using the AVX instruction set. -config CRYPTO_LIB_DES - tristate - config CRYPTO_DES tristate "DES and Triple DES EDE cipher algorithms" select CRYPTO_ALGAPI @@ -1845,6 +1833,7 @@ config CRYPTO_STATS config CRYPTO_HASH_INFO bool +source "lib/crypto/Kconfig" source "drivers/crypto/Kconfig" source "crypto/asymmetric_keys/Kconfig" source "certs/Kconfig" diff --git a/lib/crypto/Kconfig b/lib/crypto/Kconfig new file mode 100644 index 000000000000..261430051595 --- /dev/null +++ b/lib/crypto/Kconfig @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: GPL-2.0 + +comment "Crypto library routines" + +config CRYPTO_LIB_AES + tristate + +config CRYPTO_LIB_ARC4 + tristate + +config CRYPTO_LIB_DES + tristate + +config CRYPTO_LIB_SHA256 + tristate diff --git a/lib/crypto/Makefile b/lib/crypto/Makefile index cbe0b6a6450d..63de4cb3fcf8 100644 --- a/lib/crypto/Makefile +++ b/lib/crypto/Makefile @@ -1,13 +1,13 @@ # SPDX-License-Identifier: GPL-2.0 -obj-$(CONFIG_CRYPTO_LIB_AES) += libaes.o -libaes-y := aes.o +obj-$(CONFIG_CRYPTO_LIB_AES) += libaes.o +libaes-y := aes.o -obj-$(CONFIG_CRYPTO_LIB_ARC4) += libarc4.o -libarc4-y := arc4.o +obj-$(CONFIG_CRYPTO_LIB_ARC4) += libarc4.o +libarc4-y := arc4.o -obj-$(CONFIG_CRYPTO_LIB_DES) += libdes.o -libdes-y := des.o +obj-$(CONFIG_CRYPTO_LIB_DES) += libdes.o +libdes-y := des.o -obj-$(CONFIG_CRYPTO_LIB_SHA256) += libsha256.o -libsha256-y := sha256.o +obj-$(CONFIG_CRYPTO_LIB_SHA256) += libsha256.o +libsha256-y := sha256.o