Skip to contentSkip to conversation

Make crypto core API modular

PATCH In review Sebastian Siewior 2 participants 4 messages Dec 1, 2007 – Dec 4, 2007 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make crypto core API modular

This patch makes the whole crypto API is modular.

---
 crypto/Kconfig         |    2 +-
 crypto/Makefile        |    3 ++-
 include/linux/crypto.h |    2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)
crypto/Kconfig +1 -1
@@ -13,7 +13,7 @@
 # Cryptographic API Configuration
 #
 menuconfig CRYPTO
-	bool "Cryptographic API"
+	tristate "Cryptographic API"
 	help
 	  This option provides the core Cryptographic API.
 
crypto/Makefile +2 -1
@@ -2,7 +2,8 @@
 # Cryptographic API
 #
 
-obj-$(CONFIG_CRYPTO) += api.o cipher.o digest.o compress.o
+obj-$(CONFIG_CRYPTO) += crypto_core.o
+crypto_core-y := api.o cipher.o digest.o compress.o
 
 crypto_algapi-$(CONFIG_PROC_FS) += proc.o
 crypto_algapi-objs := algapi.o scatterwalk.o $(crypto_algapi-y)
include/linux/crypto.h +1 -1
@@ -299,7 +299,7 @@
 /*
  * Algorithm query interface.
  */
-#ifdef CONFIG_CRYPTO
+#if defined(CONFIG_CRYPTO) || defined(CONFIG_CRYPTO_MODULE)
 int crypto_has_alg(const char *name, u32 type, u32 mask);
 #else
 static inline int crypto_has_alg(const char *name, u32 type, u32 mask)
#1 lore raw
Quoted 1 line · * Sebastian Siewior | 2007-12-01 13:19:10 [+0100]:

This patch makes the whole crypto API is modular.

Ups, I forgot to put a MODULE_VERSION("GPL") inside of the module. Herbert, do you nack that patch due to non-sense or do you think that this might be usefull and I should send an updated one?

Sebastian

maintainer
#2 lore raw
Quoted 6 lines · Sebastian Siewior
Quoted 1 line · * Sebastian Siewior | 2007-12-01 13:19:10 [+0100]:

This patch makes the whole crypto API is modular.

Ups, I forgot to put a MODULE_VERSION("GPL") inside of the module. Herbert, do you nack that patch due to non-sense or do you think that this might be usefull and I should send an updated one?

Yes I like the idea.

However, could you please fix all the crypto users to select CRYPTO first? We can then do the modularisation for the next release.

I think we should also get rid of the ifdef CONFIG_CRYPTO because it has no legitimate uses.

Thanks,

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#3 lore raw
Quoted 2 lines · * Herbert Xu | 2007-12-04 12:10:35 [+1100]:

However, could you please fix all the crypto users to select CRYPTO first? We can then do the modularisation for the next release.

I mailed two patches to netdev where modules where using crypto code and were not selecting crypto in Kconfig. This is _now_ broken even before this patch. Others seemed to be fine on the first look.

Quoted 2 lines

I think we should also get rid of the ifdef CONFIG_CRYPTO because it has no legitimate uses.

Okey, I try to get rid of this and I will check the crypto users.

Quoted 1 line

Thanks,

Sebastian