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


Groups > linux.kernel > #1210190

Re: [PATCH v2 1/8] crypto: support (de)compression API that doesn't require tfm object

From Herbert Xu <herbert@gondor.apana.org.au>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/8] crypto: support (de)compression API that doesn't require tfm object
Date 2015-08-20 08:50 +0200
Message-ID <pZrPI-5tD-1@gated-at.bofh.it> (permalink)
References <pZrG1-5if-5@gated-at.bofh.it> <pZrG1-5if-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Aug 20, 2015 at 03:34:57PM +0900, Joonsoo Kim wrote:
> Until now, tfm object embeds (de)compression context in it and
> (de)compression in crypto API requires tfm object to use
> this context. But, there are some algorithms that doesn't need
> such context to operate. Therefore, this patch introduce new crypto
> compression API that call (de)compression function via crypto_alg,
> instead of tfm object. crypto_alg is required to get appropriate
> (de)compression function pointer. This can reduce overhead of
> maintaining multiple tfm if (de)compression doesn't require
> any context to operate.
> 
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

This isn't going to fly I'm afraid.  The main purpose of a tfm
is not to allocate memory but to track the crypto_alg object
which could be a hardware device.

So you're not going to get away with not allocating it.

What you can do for these contextless algorithms (and by definition
every compression algorithm is conxteless) is to allocate a system-
wide tfm that is used by everybody, or at least by every one within
your subsystem.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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 v2 1/8] crypto: support (de)compression API that doesn't require tfm object Joonsoo Kim <js1304@gmail.com> - 2015-08-20 08:40 +0200
  Re: [PATCH v2 1/8] crypto: support (de)compression API that doesn't  require tfm object Herbert Xu <herbert@gondor.apana.org.au> - 2015-08-20 08:50 +0200
    Re: [PATCH v2 1/8] crypto: support (de)compression API that doesn't  require tfm object Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2015-08-20 09:50 +0200
      Re: [PATCH v2 1/8] crypto: support (de)compression API that doesn't  require tfm object Herbert Xu <herbert@gondor.apana.org.au> - 2015-08-20 10:00 +0200
        Re: [PATCH v2 1/8] crypto: support (de)compression API that doesn't  require tfm object Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2015-08-20 10:00 +0200

csiph-web