All of lore.kernel.org
 help / color / mirror / Atom feed
From: Iuliana Prodan <iuliana.prodan@nxp.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
	Horia Geanta <horia.geanta@nxp.com>,
	Aymen Sghaier <aymen.sghaier@nxp.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Silvano Di Ninno <silvano.dininno@nxp.com>,
	Franck Lenormand <franck.lenormand@nxp.com>,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-imx <linux-imx@nxp.com>,
	Iuliana Prodan <iuliana.prodan@nxp.com>
Subject: [PATCH v6 0/9] crypto: caam - backlogging support
Date: Wed, 12 Feb 2020 19:55:15 +0200	[thread overview]
Message-ID: <1581530124-9135-1-git-send-email-iuliana.prodan@nxp.com> (raw)

Integrate crypto_engine framework into CAAM, to make use of
the engine queue.
Added support for SKCIPHER, HASH, RSA and AEAD algorithms.
This is intended to be used for CAAM backlogging support.
The requests, with backlog flag (e.g. from dm-crypt) will be
listed into crypto-engine queue and processed by CAAM when free.

While here, I've also made some refactorization.
Patches #1 - #4 include some refactorizations on caamalg, caamhash
and caampkc.
Patch #5 changes the return code of caam_jr_enqueue function
to -EINPROGRESS, in case of success, -ENOSPC in case the CAAM is
busy, -EIO if it cannot map the caller's descriptor.
Patches #6 - #9 integrate crypto_engine into CAAM, for
SKCIPHER/AEAD/RSA/HASH algorithms.

---
Changes since V5:
	- remove unnecessary initializations;
	- add local variable for share descriptor offset for skcipher and hash;
	- handle error case for ahash_update_first and ahash_update_no_ctx.

Changes since V4:
	- reorganize {skcipher,aead,rsa}_edesc struct for a proper
	  cacheline sharing.

Changes since V3:
	- update return on ahash_enqueue_req function from patch #9.

Changes since V2:
	- remove patch ("crypto: caam - refactor caam_jr_enqueue"),
	  that added some structures not needed anymore;
	- use _done_ callback function directly for skcipher and aead;
	- handle resource leak in case of transfer request to crypto-engine;
	- update commit messages.

Changes since V1:
	- remove helper function - akcipher_request_cast;
	- remove any references to crypto_async_request,
	  use specific request type;
	- remove bypass crypto-engine queue, in case is empty;
	- update some commit messages;
	- remove unrelated changes, like whitespaces;
	- squash some changes from patch #9 to patch #6;
	- added Reviewed-by.

Iuliana Prodan (9):
  crypto: caam - refactor skcipher/aead/gcm/chachapoly {en,de}crypt
    functions
  crypto: caam - refactor ahash_done callbacks
  crypto: caam - refactor ahash_edesc_alloc
  crypto: caam - refactor RSA private key _done callbacks
  crypto: caam - change return code in caam_jr_enqueue function
  crypto: caam - support crypto_engine framework for SKCIPHER algorithms
  crypto: caam - add crypto_engine support for AEAD algorithms
  crypto: caam - add crypto_engine support for RSA algorithms
  crypto: caam - add crypto_engine support for HASH algorithms

 drivers/crypto/caam/Kconfig    |   1 +
 drivers/crypto/caam/caamalg.c  | 413 ++++++++++++++++++-----------------------
 drivers/crypto/caam/caamhash.c | 338 +++++++++++++++++----------------
 drivers/crypto/caam/caampkc.c  | 185 +++++++++++-------
 drivers/crypto/caam/caampkc.h  |  10 +
 drivers/crypto/caam/caamrng.c  |   4 +-
 drivers/crypto/caam/intern.h   |   2 +
 drivers/crypto/caam/jr.c       |  36 +++-
 drivers/crypto/caam/key_gen.c  |   2 +-
 9 files changed, 512 insertions(+), 479 deletions(-)

-- 
2.1.0


             reply	other threads:[~2020-02-12 17:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12 17:55 Iuliana Prodan [this message]
2020-02-12 17:55 ` [PATCH v6 1/9] crypto: caam - refactor skcipher/aead/gcm/chachapoly {en,de}crypt functions Iuliana Prodan
2020-02-12 17:55 ` [PATCH v6 2/9] crypto: caam - refactor ahash_done callbacks Iuliana Prodan
2020-02-12 17:55 ` [PATCH v6 3/9] crypto: caam - refactor ahash_edesc_alloc Iuliana Prodan
2020-02-12 17:55 ` [PATCH v6 4/9] crypto: caam - refactor RSA private key _done callbacks Iuliana Prodan
2020-02-12 17:55 ` [PATCH v6 5/9] crypto: caam - change return code in caam_jr_enqueue function Iuliana Prodan
2020-02-12 17:55 ` [PATCH v6 6/9] crypto: caam - support crypto_engine framework for SKCIPHER algorithms Iuliana Prodan
2020-02-12 18:52   ` Horia Geanta
2020-02-12 17:55 ` [PATCH v6 7/9] crypto: caam - add crypto_engine support for AEAD algorithms Iuliana Prodan
2020-02-12 18:57   ` Horia Geanta
2020-02-12 17:55 ` [PATCH v6 8/9] crypto: caam - add crypto_engine support for RSA algorithms Iuliana Prodan
2020-02-12 19:00   ` Horia Geanta
2020-02-12 17:55 ` [PATCH v6 9/9] crypto: caam - add crypto_engine support for HASH algorithms Iuliana Prodan
2020-02-12 19:04   ` Horia Geanta
2020-02-22  1:42 ` [PATCH v6 0/9] crypto: caam - backlogging support Herbert Xu

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=1581530124-9135-1-git-send-email-iuliana.prodan@nxp.com \
    --to=iuliana.prodan@nxp.com \
    --cc=aymen.sghaier@nxp.com \
    --cc=davem@davemloft.net \
    --cc=franck.lenormand@nxp.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=horia.geanta@nxp.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=silvano.dininno@nxp.com \
    /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 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.