Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1229292

[RFC][PATCH 1/9] crypto: introduce CRYPTO_ALG_TFM_MAY_SHARE flag

From Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Newsgroups linux.kernel
Subject [RFC][PATCH 1/9] crypto: introduce CRYPTO_ALG_TFM_MAY_SHARE flag
Date 2015-09-21 15:20 +0200
Message-ID <qb9aF-7Hp-3@gated-at.bofh.it> (permalink)
References <q9Wfw-1oJ-7@gated-at.bofh.it> <qb9aF-7Hp-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Set CRYPTO_ALG_TFM_MAY_SHARE ->cra_flags when algorithm support
shared tfm.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
 include/linux/crypto.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index e71cb70..66f10f8 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -102,6 +102,11 @@
 #define CRYPTO_ALG_INTERNAL		0x00002000
 
 /*
+ * Mark that algorithm can use shared tfm
+ */
+#define CRYPTO_ALG_TFM_MAY_SHARE	0x00004000
+
+/*
  * Transform masks and values (for crt_flags).
  */
 #define CRYPTO_TFM_REQ_MASK		0x000fff00
@@ -648,6 +653,11 @@ static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm)
 	return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK;
 }
 
+static inline u32 crypto_tfm_may_share(struct crypto_tfm *tfm)
+{
+	return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TFM_MAY_SHARE;
+}
+
 static inline unsigned int crypto_tfm_alg_blocksize(struct crypto_tfm *tfm)
 {
 	return tfm->__crt_alg->cra_blocksize;
-- 
2.6.0.rc2.10.gf4d9753

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/9] zram: introduce crypto decompress noctx API and use it on zram Joonsoo Kim <js1304@gmail.com> - 2015-09-18 07:20 +0200
  [PATCH v3 4/9] crypto/lz4hc: support decompress_noctx Joonsoo Kim <js1304@gmail.com> - 2015-09-18 07:30 +0200
  [PATCH v3 3/9] crypyo/lz4: support decompress_noctx Joonsoo Kim <js1304@gmail.com> - 2015-09-18 07:30 +0200
  [PATCH v3 8/9] zram: use crypto API for compression Joonsoo Kim <js1304@gmail.com> - 2015-09-18 07:30 +0200
    Re: [PATCH v3 8/9] zram: use crypto API for compression Minchan Kim <minchan@kernel.org> - 2015-09-21 05:50 +0200
    Re: [PATCH v3 8/9] zram: use crypto API for compression Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-09-21 07:20 +0200
  [PATCH v3 6/9] zram: make stream find and release functions static Joonsoo Kim <js1304@gmail.com> - 2015-09-18 07:30 +0200
    Re: [PATCH v3 6/9] zram: make stream find and release functions  static Minchan Kim <minchan@kernel.org> - 2015-09-21 01:40 +0200
  [PATCH v3 2/9] crypto/lzo: support decompress_noctx Joonsoo Kim <js1304@gmail.com> - 2015-09-18 07:30 +0200
  [PATCH v3 5/9] crypto/842: support decompress_noctx Joonsoo Kim <js1304@gmail.com> - 2015-09-18 07:30 +0200
  [PATCH v3 7/9] zram: pass zstrm down to decompression path Joonsoo Kim <js1304@gmail.com> - 2015-09-18 07:30 +0200
    Re: [PATCH v3 7/9] zram: pass zstrm down to decompression path Minchan Kim <minchan@kernel.org> - 2015-09-21 01:50 +0200
  [PATCH v3 9/9] zram: use crypto decompress_noctx API Joonsoo Kim <js1304@gmail.com> - 2015-09-18 07:30 +0200
    Re: [PATCH v3 9/9] zram: use crypto decompress_noctx API Minchan Kim <minchan@kernel.org> - 2015-09-21 06:00 +0200
    Re: [PATCH v3 9/9] zram: use crypto decompress_noctx API Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-09-21 07:30 +0200
    Re: [PATCH v3 9/9] zram: use crypto decompress_noctx API Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-09-21 10:00 +0200
  [PATCH v3 1/9] crypto: introduce decompression API that can be called via sharable tfm object Joonsoo Kim <js1304@gmail.com> - 2015-09-18 07:30 +0200
    Re: [PATCH v3 1/9] crypto: introduce decompression API that can be  called via sharable tfm object Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-09-21 07:40 +0200
    Re: [PATCH v3 1/9] crypto: introduce decompression API that can be  called via sharable tfm object Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-09-21 08:20 +0200
  Re: [PATCH v3 0/9] zram: introduce crypto decompress noctx API and  use it on zram Minchan Kim <minchan@kernel.org> - 2015-09-21 06:00 +0200
  [RFC][PATCH 1/9] crypto: introduce CRYPTO_ALG_TFM_MAY_SHARE flag Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-09-21 15:20 +0200
  [RFC][PATCH 6/9] zram: make stream find and release functions static Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-09-21 15:20 +0200
  [RFC][PATCH 3/9] crypto/lz4: set CRYPTO_ALG_TFM_MAY_SHARE Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-09-21 15:20 +0200
  [RFC][PATCH 5/9] crypto/842: set CRYPTO_ALG_TFM_MAY_SHARE Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-09-21 15:20 +0200
  [RFC][PATCH 0/9] use CRYPTO_ALG_TFM_MAY_SHARE cra flag (full patchset) Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-09-21 15:20 +0200
    [RFC][PATCH 4/9] crypto/lz4hc: set CRYPTO_ALG_TFM_MAY_SHARE Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-09-21 15:20 +0200
    [RFC][PATCH 2/9] crypto/lzo: set CRYPTO_ALG_TFM_MAY_SHARE Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-09-21 15:20 +0200
    [RFC][PATCH 7/9] zram: pass zstrm down to decompression path Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-09-21 15:20 +0200
    [RFC][PATCH 9/9] zram: use crypto CRYPTO_ALG_TFM_MAY_SHARE API Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-09-21 15:30 +0200
    Re: [RFC][PATCH 0/9] use CRYPTO_ALG_TFM_MAY_SHARE cra flag (full  patchset) Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-09-21 15:30 +0200
    [RFC][PATCH 8/9] zram: use crypto API for compression Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-09-21 15:50 +0200

csiph-web