Skip to content

RFC crypto: engine - Permit to enqueue all async requests

Corentin Labbe linux-arm-kernel linux-crypto lkml virtualization 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4crypto: engine - Permit to enqueue all async requestscrypto/crypto_engine.c include/crypto/engine.h+60 -1749 replies
1/4crypto: engine - Permit to enqueue all async requestscrypto/crypto_engine.c include/crypto/engine.h+60 -1740 replies
2/4crypto: omap: convert to new crypto engine APIdrivers/crypto/omap-aes.c drivers/crypto/omap-aes.h drivers/crypto/omap-des.c+36 -120 replies
3/4crypto: virtio: convert to new crypto engine APIdrivers/crypto/virtio/virtio_crypto_algs.c drivers/crypto/virtio/virtio_crypto_common.h drivers/crypto/virtio/virtio_crypto_core.c+11 -90 replies
3/4crypto: virtio: convert to new crypto engine APIdrivers/crypto/virtio/virtio_crypto_algs.c drivers/crypto/virtio/virtio_crypto_common.h drivers/crypto/virtio/virtio_crypto_core.c+11 -90 replies
4/4crypto: stm32: convert to the new crypto engine APIdrivers/crypto/stm32/stm32-hash.c+15 -72 replies
4/4crypto: stm32: convert to the new crypto engine APIdrivers/crypto/stm32/stm32-hash.c+15 -70 replies

Reviews trailers per patch

None of the 7 patches has a Reviewed-by or Acked-by.

PatchFabien Dessenne
1/4
1/4
2/4
3/4
3/4
4/4T-b T-b
4/4T-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH RFC 0/4] crypto: engine - Permit to enqueue all async requests

Hello

The current crypto_engine support only ahash and ablkcipher.
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 convert the crypto engine with the new way,
while the following patchs convert the 3 existing users of crypto_engine. Note that this split break bisection, so probably the final commit will be all merged.

The 3 latest patch were compile tested only, but the first is tested successfully with my new sun8i-ce driver.

Regards

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

Corentin Labbe (4):
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: convert to the new crypto engine API

 crypto/crypto_engine.c                       | 188 ++++++---------------------
 drivers/crypto/omap-aes.c                    |  21 ++-
 drivers/crypto/omap-aes.h                    |   3 +
 drivers/crypto/omap-des.c                    |  24 +++-
 drivers/crypto/stm32/stm32-hash.c            |  22 +++-
 drivers/crypto/virtio/virtio_crypto_algs.c   |  15 ++-
 drivers/crypto/virtio/virtio_crypto_common.h |   2 +-
 drivers/crypto/virtio/virtio_crypto_core.c   |   3 -
 include/crypto/engine.h                      |  46 +++----
 9 files changed, 122 insertions(+), 202 deletions(-)
Signature · 1 line
2.13.6