All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] crypto: engine - Permit to enqueue all async requests
@ 2018-01-26 19:15 ` Corentin Labbe
  0 siblings, 0 replies; 45+ messages in thread
From: Corentin Labbe @ 2018-01-26 19:15 UTC (permalink / raw)
  To: alexandre.torgue-qxv4g6HH51o, arei.gonglei-hv44wF8Li93QT0dZR+AlfA,
	corbet-T1hC0tSOHrs, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
	herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q,
	jasowang-H+wXaHxf7aLQT0dZR+AlfA,
	mcoquelin.stm32-Re5JQEeQqe8AvxtiuMwx3w,
	mst-H+wXaHxf7aLQT0dZR+AlfA, fabien.dessenne-qxv4g6HH51o
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-crypto-u79uwXL29TY76Z2rM5mHXA,
	linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Corentin Labbe

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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org/msg1474434.html

Changes since V1:
- renamed crypto_engine_reqctx to crypto_engine_ctx
- indentation fix in function parameter
- do not export crypto_transfer_request
- Add aead support
- crypto_finalize_request is now static

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       |  48 +++++
 crypto/crypto_engine.c                       | 301 +++++++++++++++------------
 drivers/crypto/omap-aes.c                    |  21 +-
 drivers/crypto/omap-aes.h                    |   3 +
 drivers/crypto/omap-des.c                    |  24 ++-
 drivers/crypto/stm32/stm32-cryp.c            |  29 ++-
 drivers/crypto/stm32/stm32-hash.c            |  20 +-
 drivers/crypto/virtio/virtio_crypto_algs.c   |  16 +-
 drivers/crypto/virtio/virtio_crypto_common.h |   3 +-
 drivers/crypto/virtio/virtio_crypto_core.c   |   3 -
 include/crypto/engine.h                      |  68 +++---
 11 files changed, 332 insertions(+), 204 deletions(-)
 create mode 100644 Documentation/crypto/crypto_engine.rst

-- 
2.13.6

^ permalink raw reply	[flat|nested] 45+ messages in thread
* [PATCH v2 0/6] crypto: engine - Permit to enqueue all async requests
@ 2018-01-26 19:15 Corentin Labbe
  0 siblings, 0 replies; 45+ messages in thread
From: Corentin Labbe @ 2018-01-26 19:15 UTC (permalink / raw)
  To: alexandre.torgue, arei.gonglei, corbet, davem, herbert, jasowang,
	mcoquelin.stm32, mst, fabien.dessenne
  Cc: linux-doc, linux-kernel, virtualization, linux-sunxi,
	Corentin Labbe, linux-crypto, linux-arm-kernel

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@vger.kernel.org/msg1474434.html

Changes since V1:
- renamed crypto_engine_reqctx to crypto_engine_ctx
- indentation fix in function parameter
- do not export crypto_transfer_request
- Add aead support
- crypto_finalize_request is now static

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       |  48 +++++
 crypto/crypto_engine.c                       | 301 +++++++++++++++------------
 drivers/crypto/omap-aes.c                    |  21 +-
 drivers/crypto/omap-aes.h                    |   3 +
 drivers/crypto/omap-des.c                    |  24 ++-
 drivers/crypto/stm32/stm32-cryp.c            |  29 ++-
 drivers/crypto/stm32/stm32-hash.c            |  20 +-
 drivers/crypto/virtio/virtio_crypto_algs.c   |  16 +-
 drivers/crypto/virtio/virtio_crypto_common.h |   3 +-
 drivers/crypto/virtio/virtio_crypto_core.c   |   3 -
 include/crypto/engine.h                      |  68 +++---
 11 files changed, 332 insertions(+), 204 deletions(-)
 create mode 100644 Documentation/crypto/crypto_engine.rst

-- 
2.13.6

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

end of thread, other threads:[~2018-02-17  4:42 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-26 19:15 [PATCH v2 0/6] crypto: engine - Permit to enqueue all async requests Corentin Labbe
2018-01-26 19:15 ` Corentin Labbe
2018-01-26 19:15 ` Corentin Labbe
2018-01-26 19:15 ` [PATCH v2 1/6] Documentation: crypto: document crypto engine API Corentin Labbe
2018-01-26 19:15 ` [PATCH v2 2/6] crypto: engine - Permit to enqueue all async requests Corentin Labbe
2018-01-26 19:15 ` [PATCH v2 3/6] crypto: omap: convert to new crypto engine API Corentin Labbe
2018-01-26 19:15 ` [PATCH v2 4/6] crypto: virtio: " Corentin Labbe
     [not found] ` <20180126191534.17569-1-clabbe.montjoie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-01-26 19:15   ` [PATCH v2 1/6] Documentation: crypto: document " Corentin Labbe
2018-01-26 19:15     ` Corentin Labbe
2018-01-26 19:15     ` Corentin Labbe
2018-01-26 19:15   ` [PATCH v2 2/6] crypto: engine - Permit to enqueue all async requests Corentin Labbe
2018-01-26 19:15     ` Corentin Labbe
2018-01-26 19:15     ` Corentin Labbe
2018-02-14 13:31     ` Fabien DESSENNE
2018-02-14 13:31     ` Fabien DESSENNE
2018-02-14 13:31       ` Fabien DESSENNE
2018-02-14 13:31       ` Fabien DESSENNE
2018-01-26 19:15   ` [PATCH v2 3/6] crypto: omap: convert to new crypto engine API Corentin Labbe
2018-01-26 19:15     ` Corentin Labbe
2018-01-26 19:15     ` Corentin Labbe
2018-01-26 19:15   ` [PATCH v2 4/6] crypto: virtio: " Corentin Labbe
2018-01-26 19:15     ` Corentin Labbe
2018-01-26 19:15     ` Corentin Labbe
2018-02-14 15:51     ` Michael S. Tsirkin
2018-02-14 15:51       ` Michael S. Tsirkin
2018-02-14 15:51       ` Michael S. Tsirkin
2018-01-26 19:15   ` [PATCH v2 5/6] crypto: stm32-hash: convert to the " Corentin Labbe
2018-01-26 19:15     ` Corentin Labbe
2018-01-26 19:15     ` Corentin Labbe
2018-02-15 15:51   ` [PATCH v2 0/6] crypto: engine - Permit to enqueue all async requests Herbert Xu
2018-02-15 15:51     ` Herbert Xu
2018-02-15 15:51     ` Herbert Xu
2018-02-16 15:36     ` Corentin Labbe
     [not found]     ` <20180215155100.GJ7352-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2018-02-16 15:36       ` Corentin Labbe
2018-02-16 15:36         ` Corentin Labbe
2018-02-16 15:36         ` Corentin Labbe
2018-02-17  4:42         ` Herbert Xu
2018-02-17  4:42         ` Herbert Xu
2018-02-17  4:42           ` Herbert Xu
2018-01-26 19:15 ` [PATCH v2 5/6] crypto: stm32-hash: convert to the new crypto engine API Corentin Labbe
2018-01-26 19:15 ` [PATCH v2 6/6] crypto: stm32-cryp: " Corentin Labbe
2018-01-26 19:15   ` Corentin Labbe
2018-01-26 19:15 ` Corentin Labbe
2018-02-15 15:51 ` [PATCH v2 0/6] crypto: engine - Permit to enqueue all async requests Herbert Xu
  -- strict thread matches above, loose matches on Subject: below --
2018-01-26 19:15 Corentin Labbe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.