All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: linux-crypto@vger.kernel.org
Cc: Cheng-Yi Chiang <cychiang@chromium.org>,
	ecryptfs@vger.kernel.org,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Gilad Ben-Yossef <gilad@benyossef.com>,
	Guenter Roeck <groeck@chromium.org>,
	Jesper Nilsson <jesper.nilsson@axis.com>,
	Kamil Konieczny <k.konieczny@samsung.com>,
	keyrings@vger.kernel.org, Krzysztof Kozlowski <krzk@kernel.org>,
	Krzysztof Opasiak <k.opasiak@samsung.com>,
	Lars Persson <lars.persson@axis.com>,
	linux-bluetooth@vger.kernel.org, linux-mtd@lists.infradead.org,
	linux-nfs@vger.kernel.org, linux-sctp@vger.kernel.org,
	Robert Baldyga <r.baldyga@samsung.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	Vladimir Zapolskiy <vz@mleia.com>, Zaibo Xu <xuzaibo@huawei.com>
Subject: [PATCH 00/20] crypto: introduce crypto_shash_tfm_digest()
Date: Fri,  1 May 2020 22:31:02 -0700	[thread overview]
Message-ID: <20200502053122.995648-1-ebiggers@kernel.org> (raw)

This series introduces a helper function crypto_shash_tfm_digest() which
replaces the following common pattern:

	{
		SHASH_DESC_ON_STACK(desc, tfm);
		int err;

		desc->tfm = tfm;

		err = crypto_shash_digest(desc, data, len, out);

		shash_desc_zero(desc);
	}

with:

	err = crypto_shash_tfm_digest(tfm, data, len, out);

Patch 1 introduces this helper function, and patches 2-20 convert all
relevant users to use it.

IMO, it would be easiest to take all these patches through the crypto
tree.  But taking just the "crypto:" ones and then me trying to get the
rest merged later via subsystem trees is also an option.

Eric Biggers (20):
  crypto: hash - introduce crypto_shash_tfm_digest()
  crypto: arm64/aes-glue - use crypto_shash_tfm_digest()
  crypto: essiv - use crypto_shash_tfm_digest()
  crypto: artpec6 - use crypto_shash_tfm_digest()
  crypto: ccp - use crypto_shash_tfm_digest()
  crypto: ccree - use crypto_shash_tfm_digest()
  crypto: hisilicon/sec2 - use crypto_shash_tfm_digest()
  crypto: mediatek - use crypto_shash_tfm_digest()
  crypto: n2 - use crypto_shash_tfm_digest()
  crypto: omap-sham - use crypto_shash_tfm_digest()
  crypto: s5p-sss - use crypto_shash_tfm_digest()
  nfc: s3fwrn5: use crypto_shash_tfm_digest()
  fscrypt: use crypto_shash_tfm_digest()
  ecryptfs: use crypto_shash_tfm_digest()
  nfsd: use crypto_shash_tfm_digest()
  ubifs: use crypto_shash_tfm_digest()
  Bluetooth: use crypto_shash_tfm_digest()
  sctp: use crypto_shash_tfm_digest()
  KEYS: encrypted: use crypto_shash_tfm_digest()
  ASoC: cros_ec_codec: use crypto_shash_tfm_digest()

 arch/arm64/crypto/aes-glue.c               |  4 +--
 crypto/essiv.c                             |  4 +--
 crypto/shash.c                             | 16 +++++++++
 drivers/crypto/axis/artpec6_crypto.c       | 10 ++----
 drivers/crypto/ccp/ccp-crypto-sha.c        |  9 ++---
 drivers/crypto/ccree/cc_cipher.c           |  9 ++---
 drivers/crypto/hisilicon/sec2/sec_crypto.c |  5 ++-
 drivers/crypto/mediatek/mtk-sha.c          |  7 ++--
 drivers/crypto/n2_core.c                   |  7 ++--
 drivers/crypto/omap-sham.c                 | 20 +++--------
 drivers/crypto/s5p-sss.c                   | 39 ++++------------------
 drivers/nfc/s3fwrn5/firmware.c             | 10 +-----
 fs/crypto/fname.c                          |  7 +---
 fs/crypto/hkdf.c                           |  6 +---
 fs/ecryptfs/crypto.c                       | 17 +---------
 fs/nfsd/nfs4recover.c                      | 26 ++++-----------
 fs/ubifs/auth.c                            | 20 ++---------
 fs/ubifs/master.c                          |  9 ++---
 fs/ubifs/replay.c                          | 14 ++------
 include/crypto/hash.h                      | 19 +++++++++++
 net/bluetooth/smp.c                        |  6 +---
 net/sctp/auth.c                            | 10 ++----
 net/sctp/sm_make_chunk.c                   | 23 +++++--------
 security/keys/encrypted-keys/encrypted.c   | 18 ++--------
 sound/soc/codecs/cros_ec_codec.c           |  9 +----
 25 files changed, 95 insertions(+), 229 deletions(-)

-- 
2.26.2


WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers@kernel.org>
To: linux-crypto@vger.kernel.org
Cc: Cheng-Yi Chiang <cychiang@chromium.org>,
	ecryptfs@vger.kernel.org,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Gilad Ben-Yossef <gilad@benyossef.com>,
	Guenter Roeck <groeck@chromium.org>,
	Jesper Nilsson <jesper.nilsson@axis.com>,
	Kamil Konieczny <k.konieczny@samsung.com>,
	keyrings@vger.kernel.org, Krzysztof Kozlowski <krzk@kernel.org>,
	Krzysztof Opasiak <k.opasiak@samsung.com>,
	Lars Persson <lars.persson@axis.com>,
	linux-bluetooth@vger.kernel.org, linux-mtd@lists.infradead.org,
	linux-nfs@vger.kernel.org, linux-sctp@vger.kernel.org,
	Robert Baldyga <r.baldyga@samsung.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	Vladimir Zapolskiy <vz@mleia.com>, Zaibo Xu <xuzaibo@huawei.com>
Subject: [PATCH 00/20] crypto: introduce crypto_shash_tfm_digest()
Date: Sat, 02 May 2020 05:31:02 +0000	[thread overview]
Message-ID: <20200502053122.995648-1-ebiggers@kernel.org> (raw)

This series introduces a helper function crypto_shash_tfm_digest() which
replaces the following common pattern:

	{
		SHASH_DESC_ON_STACK(desc, tfm);
		int err;

		desc->tfm = tfm;

		err = crypto_shash_digest(desc, data, len, out);

		shash_desc_zero(desc);
	}

with:

	err = crypto_shash_tfm_digest(tfm, data, len, out);

Patch 1 introduces this helper function, and patches 2-20 convert all
relevant users to use it.

IMO, it would be easiest to take all these patches through the crypto
tree.  But taking just the "crypto:" ones and then me trying to get the
rest merged later via subsystem trees is also an option.

Eric Biggers (20):
  crypto: hash - introduce crypto_shash_tfm_digest()
  crypto: arm64/aes-glue - use crypto_shash_tfm_digest()
  crypto: essiv - use crypto_shash_tfm_digest()
  crypto: artpec6 - use crypto_shash_tfm_digest()
  crypto: ccp - use crypto_shash_tfm_digest()
  crypto: ccree - use crypto_shash_tfm_digest()
  crypto: hisilicon/sec2 - use crypto_shash_tfm_digest()
  crypto: mediatek - use crypto_shash_tfm_digest()
  crypto: n2 - use crypto_shash_tfm_digest()
  crypto: omap-sham - use crypto_shash_tfm_digest()
  crypto: s5p-sss - use crypto_shash_tfm_digest()
  nfc: s3fwrn5: use crypto_shash_tfm_digest()
  fscrypt: use crypto_shash_tfm_digest()
  ecryptfs: use crypto_shash_tfm_digest()
  nfsd: use crypto_shash_tfm_digest()
  ubifs: use crypto_shash_tfm_digest()
  Bluetooth: use crypto_shash_tfm_digest()
  sctp: use crypto_shash_tfm_digest()
  KEYS: encrypted: use crypto_shash_tfm_digest()
  ASoC: cros_ec_codec: use crypto_shash_tfm_digest()

 arch/arm64/crypto/aes-glue.c               |  4 +--
 crypto/essiv.c                             |  4 +--
 crypto/shash.c                             | 16 +++++++++
 drivers/crypto/axis/artpec6_crypto.c       | 10 ++----
 drivers/crypto/ccp/ccp-crypto-sha.c        |  9 ++---
 drivers/crypto/ccree/cc_cipher.c           |  9 ++---
 drivers/crypto/hisilicon/sec2/sec_crypto.c |  5 ++-
 drivers/crypto/mediatek/mtk-sha.c          |  7 ++--
 drivers/crypto/n2_core.c                   |  7 ++--
 drivers/crypto/omap-sham.c                 | 20 +++--------
 drivers/crypto/s5p-sss.c                   | 39 ++++------------------
 drivers/nfc/s3fwrn5/firmware.c             | 10 +-----
 fs/crypto/fname.c                          |  7 +---
 fs/crypto/hkdf.c                           |  6 +---
 fs/ecryptfs/crypto.c                       | 17 +---------
 fs/nfsd/nfs4recover.c                      | 26 ++++-----------
 fs/ubifs/auth.c                            | 20 ++---------
 fs/ubifs/master.c                          |  9 ++---
 fs/ubifs/replay.c                          | 14 ++------
 include/crypto/hash.h                      | 19 +++++++++++
 net/bluetooth/smp.c                        |  6 +---
 net/sctp/auth.c                            | 10 ++----
 net/sctp/sm_make_chunk.c                   | 23 +++++--------
 security/keys/encrypted-keys/encrypted.c   | 18 ++--------
 sound/soc/codecs/cros_ec_codec.c           |  9 +----
 25 files changed, 95 insertions(+), 229 deletions(-)

-- 
2.26.2

WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers@kernel.org>
To: linux-crypto@vger.kernel.org
Cc: Tom Lendacky <thomas.lendacky@amd.com>,
	Jesper Nilsson <jesper.nilsson@axis.com>,
	linux-bluetooth@vger.kernel.org,
	Kamil Konieczny <k.konieczny@samsung.com>,
	Robert Baldyga <r.baldyga@samsung.com>,
	ecryptfs@vger.kernel.org,
	Krzysztof Opasiak <k.opasiak@samsung.com>,
	linux-nfs@vger.kernel.org, Krzysztof Kozlowski <krzk@kernel.org>,
	Vladimir Zapolskiy <vz@mleia.com>,
	Gilad Ben-Yossef <gilad@benyossef.com>,
	linux-sctp@vger.kernel.org, keyrings@vger.kernel.org,
	linux-mtd@lists.infradead.org,
	Lars Persson <lars.persson@axis.com>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Guenter Roeck <groeck@chromium.org>,
	Zaibo Xu <xuzaibo@huawei.com>,
	Cheng-Yi Chiang <cychiang@chromium.org>
Subject: [PATCH 00/20] crypto: introduce crypto_shash_tfm_digest()
Date: Fri,  1 May 2020 22:31:02 -0700	[thread overview]
Message-ID: <20200502053122.995648-1-ebiggers@kernel.org> (raw)

This series introduces a helper function crypto_shash_tfm_digest() which
replaces the following common pattern:

	{
		SHASH_DESC_ON_STACK(desc, tfm);
		int err;

		desc->tfm = tfm;

		err = crypto_shash_digest(desc, data, len, out);

		shash_desc_zero(desc);
	}

with:

	err = crypto_shash_tfm_digest(tfm, data, len, out);

Patch 1 introduces this helper function, and patches 2-20 convert all
relevant users to use it.

IMO, it would be easiest to take all these patches through the crypto
tree.  But taking just the "crypto:" ones and then me trying to get the
rest merged later via subsystem trees is also an option.

Eric Biggers (20):
  crypto: hash - introduce crypto_shash_tfm_digest()
  crypto: arm64/aes-glue - use crypto_shash_tfm_digest()
  crypto: essiv - use crypto_shash_tfm_digest()
  crypto: artpec6 - use crypto_shash_tfm_digest()
  crypto: ccp - use crypto_shash_tfm_digest()
  crypto: ccree - use crypto_shash_tfm_digest()
  crypto: hisilicon/sec2 - use crypto_shash_tfm_digest()
  crypto: mediatek - use crypto_shash_tfm_digest()
  crypto: n2 - use crypto_shash_tfm_digest()
  crypto: omap-sham - use crypto_shash_tfm_digest()
  crypto: s5p-sss - use crypto_shash_tfm_digest()
  nfc: s3fwrn5: use crypto_shash_tfm_digest()
  fscrypt: use crypto_shash_tfm_digest()
  ecryptfs: use crypto_shash_tfm_digest()
  nfsd: use crypto_shash_tfm_digest()
  ubifs: use crypto_shash_tfm_digest()
  Bluetooth: use crypto_shash_tfm_digest()
  sctp: use crypto_shash_tfm_digest()
  KEYS: encrypted: use crypto_shash_tfm_digest()
  ASoC: cros_ec_codec: use crypto_shash_tfm_digest()

 arch/arm64/crypto/aes-glue.c               |  4 +--
 crypto/essiv.c                             |  4 +--
 crypto/shash.c                             | 16 +++++++++
 drivers/crypto/axis/artpec6_crypto.c       | 10 ++----
 drivers/crypto/ccp/ccp-crypto-sha.c        |  9 ++---
 drivers/crypto/ccree/cc_cipher.c           |  9 ++---
 drivers/crypto/hisilicon/sec2/sec_crypto.c |  5 ++-
 drivers/crypto/mediatek/mtk-sha.c          |  7 ++--
 drivers/crypto/n2_core.c                   |  7 ++--
 drivers/crypto/omap-sham.c                 | 20 +++--------
 drivers/crypto/s5p-sss.c                   | 39 ++++------------------
 drivers/nfc/s3fwrn5/firmware.c             | 10 +-----
 fs/crypto/fname.c                          |  7 +---
 fs/crypto/hkdf.c                           |  6 +---
 fs/ecryptfs/crypto.c                       | 17 +---------
 fs/nfsd/nfs4recover.c                      | 26 ++++-----------
 fs/ubifs/auth.c                            | 20 ++---------
 fs/ubifs/master.c                          |  9 ++---
 fs/ubifs/replay.c                          | 14 ++------
 include/crypto/hash.h                      | 19 +++++++++++
 net/bluetooth/smp.c                        |  6 +---
 net/sctp/auth.c                            | 10 ++----
 net/sctp/sm_make_chunk.c                   | 23 +++++--------
 security/keys/encrypted-keys/encrypted.c   | 18 ++--------
 sound/soc/codecs/cros_ec_codec.c           |  9 +----
 25 files changed, 95 insertions(+), 229 deletions(-)

-- 
2.26.2


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

             reply	other threads:[~2020-05-02  5:33 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-02  5:31 Eric Biggers [this message]
2020-05-02  5:31 ` [PATCH 00/20] crypto: introduce crypto_shash_tfm_digest() Eric Biggers
2020-05-02  5:31 ` Eric Biggers
2020-05-02  5:31 ` [PATCH 01/20] crypto: hash - " Eric Biggers
2020-05-02  5:31   ` Eric Biggers
2020-05-02  5:31   ` Eric Biggers
2020-05-02  5:31 ` [PATCH 02/20] crypto: arm64/aes-glue - use crypto_shash_tfm_digest() Eric Biggers
2020-05-02  5:31 ` [PATCH 03/20] crypto: essiv " Eric Biggers
2020-05-02  5:31 ` [PATCH 04/20] crypto: artpec6 " Eric Biggers
2020-05-02  5:31 ` [PATCH 05/20] crypto: ccp " Eric Biggers
2020-05-07 21:23   ` Tom Lendacky
2020-05-02  5:31 ` [PATCH 06/20] crypto: ccree " Eric Biggers
2020-05-03 14:01   ` Gilad Ben-Yossef
2020-05-02  5:31 ` [PATCH 07/20] crypto: hisilicon/sec2 " Eric Biggers
2020-05-02  5:31 ` [PATCH 08/20] crypto: mediatek " Eric Biggers
2020-05-02  5:31 ` [PATCH 09/20] crypto: n2 " Eric Biggers
2020-05-02  5:31 ` [PATCH 10/20] crypto: omap-sham " Eric Biggers
2020-05-02  5:31 ` [PATCH 11/20] crypto: s5p-sss " Eric Biggers
2020-05-05 14:19   ` Krzysztof Kozlowski
2020-05-02  5:31 ` [PATCH 12/20] nfc: s3fwrn5: " Eric Biggers
2020-05-02  5:31 ` [PATCH 13/20] fscrypt: " Eric Biggers
2020-05-02  5:31 ` [PATCH 14/20] ecryptfs: " Eric Biggers
2020-05-02  5:31 ` [PATCH 15/20] nfsd: " Eric Biggers
2020-05-04 19:09   ` J. Bruce Fields
2020-05-02  5:31 ` [PATCH 16/20] ubifs: " Eric Biggers
2020-05-02  5:31   ` Eric Biggers
2020-05-02  5:31 ` [PATCH 17/20] Bluetooth: " Eric Biggers
2020-05-02  5:31 ` [PATCH 18/20] sctp: " Eric Biggers
2020-05-02  5:31   ` Eric Biggers
2020-05-02  5:31 ` [PATCH 19/20] KEYS: encrypted: " Eric Biggers
2020-05-02  5:31   ` Eric Biggers
2020-05-02  5:31 ` [PATCH 20/20] ASoC: cros_ec_codec: " Eric Biggers
2020-05-02  6:44 ` [PATCH 00/20] crypto: introduce crypto_shash_tfm_digest() Marcel Holtmann
2020-05-02  6:44   ` Marcel Holtmann
2020-05-02  6:44   ` Marcel Holtmann
2020-05-03 16:13 ` Ard Biesheuvel
2020-05-03 16:13   ` Ard Biesheuvel
2020-05-03 16:13   ` Ard Biesheuvel
2020-05-08  6:07 ` Herbert Xu
2020-05-08  6:07   ` Herbert Xu
2020-05-08  6:07   ` 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=20200502053122.995648-1-ebiggers@kernel.org \
    --to=ebiggers@kernel.org \
    --cc=cychiang@chromium.org \
    --cc=ecryptfs@vger.kernel.org \
    --cc=enric.balletbo@collabora.com \
    --cc=gilad@benyossef.com \
    --cc=groeck@chromium.org \
    --cc=jesper.nilsson@axis.com \
    --cc=k.konieczny@samsung.com \
    --cc=k.opasiak@samsung.com \
    --cc=keyrings@vger.kernel.org \
    --cc=krzk@kernel.org \
    --cc=lars.persson@axis.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=r.baldyga@samsung.com \
    --cc=thomas.lendacky@amd.com \
    --cc=vz@mleia.com \
    --cc=xuzaibo@huawei.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.