lkml.org 
[lkml]   [2016]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH] macsec: fix crypto Kconfig dependency
Date
On Monday 18 April 2016 18:43:36 Herbert Xu wrote:
>
> It's kind of silly really now that IPv4 selects CRYPTO which
> means that you can't really avoid seeing all those options which
> most users won't care about.

I had not noticed that IPv4 does it, but that is a good point.

We have had a couple of other subsystems with the issue (e.g. MFD),
and have turned around the logic in the end so the user-visible
options are always there and the subsystem core is selected by
all drivers that need it. We could do the same for crypto as below
(untested). I only select CRYPTO from ALGAPI2 there, which may be
wrong if some parts of crypto need the core but do not need algapi,
but it illustrates what we could do.

Arnd

diff --git a/crypto/Kconfig b/crypto/Kconfig
index 93a1fdc1feee..ed1bc0c49022 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -12,14 +12,12 @@ source "crypto/async_tx/Kconfig"
#
# Cryptographic API Configuration
#
-menuconfig CRYPTO
- tristate "Cryptographic API"
+config CRYPTO
+ tristate
help
This option provides the core Cryptographic API.

-if CRYPTO
-
-comment "Crypto core or helper"
+menu "Crypto core or helper"

config CRYPTO_FIPS
bool "FIPS 200 compliance"
@@ -39,6 +37,7 @@ config CRYPTO_ALGAPI

config CRYPTO_ALGAPI2
tristate
+ select CRYPTO

config CRYPTO_AEAD
tristate
@@ -1633,4 +1632,4 @@ source "drivers/crypto/Kconfig"
source crypto/asymmetric_keys/Kconfig
source certs/Kconfig

-endif # if CRYPTO
+endmenu
\
 
 \ /
  Last update: 2016-04-18 13:41    [W:1.238 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site