public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] crypto: export crypto_alg_list and rwsem
@ 2015-08-13  2:24 Joonsoo Kim
  2015-08-13  2:24 ` [PATCH 2/2] zram: use crypto API to compress the page Joonsoo Kim
  2015-08-13  3:19 ` [PATCH 1/2] crypto: export crypto_alg_list and rwsem Herbert Xu
  0 siblings, 2 replies; 13+ messages in thread
From: Joonsoo Kim @ 2015-08-13  2:24 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Minchan Kim, Nitin Gupta, Sergey Senozhatsky, linux-kernel,
	linux-crypto, Herbert Xu, David S. Miller, Stephan Mueller,
	Joonsoo Kim

Until now, zram uses compression algorithm through direct call
to core algorithm function, but, it has drawback that we need to add
compression algorithm manually to zram. If we don't do that, we cannot
utilize various compression algorithms in the system. To improve this
situation, zram will be changed to use crypto subsystem in following
patch. There is one problem with this change. Zram has a interface
that what compression algorithm it can support. Although crypto subsystem
has /proc interface to search all of crypto algorithm, but, there is
no way to get just compression algorithm in cryto subsystem. To implement
it on zram-side, crypto_alg_list and rwsem should be exported so
this patch do it.

Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
---
 crypto/internal.h      | 2 --
 include/linux/crypto.h | 4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/crypto/internal.h b/crypto/internal.h
index 00e42a3..806f17a 100644
--- a/crypto/internal.h
+++ b/crypto/internal.h
@@ -45,8 +45,6 @@ struct crypto_larval {
 	u32 mask;
 };
 
-extern struct list_head crypto_alg_list;
-extern struct rw_semaphore crypto_alg_sem;
 extern struct blocking_notifier_head crypto_chain;
 
 #ifdef CONFIG_PROC_FS
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index 81ef938..ab39f4b 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -24,6 +24,10 @@
 #include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/uaccess.h>
+#include <linux/rwsem.h>
+
+extern struct list_head crypto_alg_list;
+extern struct rw_semaphore crypto_alg_sem;
 
 /*
  * Autoloaded crypto modules should only use a prefixed name to avoid allowing
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-08-13  7:37 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-13  2:24 [PATCH 1/2] crypto: export crypto_alg_list and rwsem Joonsoo Kim
2015-08-13  2:24 ` [PATCH 2/2] zram: use crypto API to compress the page Joonsoo Kim
2015-08-13  3:51   ` Sergey Senozhatsky
2015-08-13  5:21     ` Sergey Senozhatsky
2015-08-13  7:19     ` Joonsoo Kim
2015-08-13  7:32       ` Herbert Xu
2015-08-13  7:42         ` Joonsoo Kim
2015-08-13  3:19 ` [PATCH 1/2] crypto: export crypto_alg_list and rwsem Herbert Xu
2015-08-13  6:37   ` Joonsoo Kim
2015-08-13  6:38     ` Herbert Xu
2015-08-13  7:30       ` Joonsoo Kim
2015-08-13  7:29         ` Herbert Xu
2015-08-13  7:43           ` Joonsoo Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox