linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: clabbe.montjoie@gmail.com (Corentin Labbe)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/6] crypto: engine - Permit to enqueue all async requests
Date: Wed,  3 Jan 2018 21:11:03 +0100	[thread overview]
Message-ID: <20180103201109.16077-1-clabbe.montjoie@gmail.com> (raw)

Hello

The current crypto_engine support only ahash and ablkcipher request.
My first patch which try to add skcipher was Nacked, it will add too many functions
and adding other algs(aead, asymetric_key) will make the situation worst.

This patchset remove all algs specific stuff and now only process generic crypto_async_request.

The requests handler function pointer are now moved out of struct engine and
are now stored directly in a crypto_engine_reqctx.

The original proposal of Herbert [1] cannot be done completly since the crypto_engine
could only dequeue crypto_async_request and it is impossible to access any request_ctx
without knowing the underlying request type.

So I do something near that was requested: adding crypto_engine_reqctx in TFM context.
Note that the current implementation expect that crypto_engine_reqctx
is the first member of the context.

The first patch is a try to document the crypto engine API.
The second patch convert the crypto engine with the new way,
while the following patchs convert the 4 existing users of crypto_engine.
Note that this split break bisection, so probably the final commit will be all merged.

Appart from virtio, all 4 latest patch were compile tested only.
But the crypto engine is tested with my new sun8i-ce driver.

Regards

[1] https://www.mail-archive.com/linux-kernel at vger.kernel.org/msg1474434.html

Changes since RFC:
- Added a documentation patch
- Added patch for stm32-cryp
- Changed parameter of all crypto_engine_op functions from
  crypto_async_request to void*
- Reintroduced crypto_transfer_xxx_request_to_engine functions

Corentin Labbe (6):
  Documentation: crypto: document crypto engine API
  crypto: engine - Permit to enqueue all async requests
  crypto: omap: convert to new crypto engine API
  crypto: virtio: convert to new crypto engine API
  crypto: stm32-hash: convert to the new crypto engine API
  crypto: stm32-cryp: convert to the new crypto engine API

 Documentation/crypto/crypto_engine.rst       |  46 ++++++
 crypto/crypto_engine.c                       | 230 +++++++++++++--------------
 drivers/crypto/omap-aes.c                    |  17 +-
 drivers/crypto/omap-aes.h                    |   3 +
 drivers/crypto/omap-des.c                    |  20 ++-
 drivers/crypto/stm32/stm32-cryp.c            |  21 ++-
 drivers/crypto/stm32/stm32-hash.c            |  18 ++-
 drivers/crypto/virtio/virtio_crypto_algs.c   |  10 +-
 drivers/crypto/virtio/virtio_crypto_common.h |   3 +-
 drivers/crypto/virtio/virtio_crypto_core.c   |   3 -
 include/crypto/engine.h                      |  59 ++++---
 11 files changed, 263 insertions(+), 167 deletions(-)
 create mode 100644 Documentation/crypto/crypto_engine.rst

-- 
2.13.6

             reply	other threads:[~2018-01-03 20:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-03 20:11 Corentin Labbe [this message]
2018-01-03 20:11 ` [PATCH 1/6] Documentation: crypto: document crypto engine API Corentin Labbe
2018-01-10 14:13   ` Fabien DESSENNE
2018-01-10 19:14     ` Corentin Labbe
2018-01-03 20:11 ` [PATCH 2/6] crypto: engine - Permit to enqueue all async requests Corentin Labbe
2018-01-10 14:19   ` Fabien DESSENNE
2018-01-11  7:44     ` Fabien DESSENNE
2018-01-12  7:14   ` Herbert Xu
2018-01-03 20:11 ` [PATCH 3/6] crypto: omap: convert to new crypto engine API Corentin Labbe
2018-01-03 20:11 ` [PATCH 4/6] crypto: virtio: " Corentin Labbe
2018-01-03 20:11 ` [PATCH 5/6] crypto: stm32-hash: convert to the " Corentin Labbe
2018-01-10 14:24   ` Fabien DESSENNE
2018-01-11  7:44     ` Fabien DESSENNE
2018-01-03 20:11 ` [PATCH 6/6] crypto: stm32-cryp: " Corentin Labbe
2018-01-10 14:25   ` Fabien DESSENNE
2018-01-11  7:45     ` Fabien DESSENNE

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180103201109.16077-1-clabbe.montjoie@gmail.com \
    --to=clabbe.montjoie@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).