From: Kamil Konieczny <k.konieczny@partner.samsung.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Marek Vasut <marex@denx.de>,
"David S. Miller" <davem@davemloft.net>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: mxs-dcp: Add empty hash export and import
Date: Thu, 18 Jan 2018 18:53:33 +0100 [thread overview]
Message-ID: <87da7572-a9a1-3fd1-e916-0cd5b161cfda@partner.samsung.com> (raw)
In-Reply-To: <4f3389a1-d6aa-b3cc-2299-d638058ddd48@partner.samsung.com>
Please drop this as I will resend it as part of patchset.
On 16.01.2018 17:16, Kamil Konieczny wrote:
> Crypto framework will require async hash export/import, so add empty
> functions to prevent OOPS.
>
> Signed-off-by: Kamil Konieczny <k.konieczny@partner.samsung.com>
> ---
> drivers/crypto/mxs-dcp.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c
> index 764be3e6933c..a10c418d4e5c 100644
> --- a/drivers/crypto/mxs-dcp.c
> +++ b/drivers/crypto/mxs-dcp.c
> @@ -759,6 +759,16 @@ static int dcp_sha_digest(struct ahash_request *req)
> return dcp_sha_finup(req);
> }
>
> +static int dcp_sha_noimport(struct ahash_request *req, const void *in)
> +{
> + return -ENOSYS;
> +}
> +
> +static int dcp_sha_noexport(struct ahash_request *req, void *out)
> +{
> + return -ENOSYS;
> +}
> +
> static int dcp_sha_cra_init(struct crypto_tfm *tfm)
> {
> crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm),
> @@ -829,6 +839,8 @@ static struct ahash_alg dcp_sha1_alg = {
> .final = dcp_sha_final,
> .finup = dcp_sha_finup,
> .digest = dcp_sha_digest,
> + .import = dcp_sha_noimport,
> + .export = dcp_sha_noexport,
> .halg = {
> .digestsize = SHA1_DIGEST_SIZE,
> .base = {
> @@ -853,6 +865,8 @@ static struct ahash_alg dcp_sha256_alg = {
> .final = dcp_sha_final,
> .finup = dcp_sha_finup,
> .digest = dcp_sha_digest,
> + .import = dcp_sha_noimport,
> + .export = dcp_sha_noexport,
> .halg = {
> .digestsize = SHA256_DIGEST_SIZE,
> .base = {
>
--
Best regards,
Kamil Konieczny
Samsung R&D Institute Poland
prev parent reply other threads:[~2018-01-18 17:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180116161641eucas1p1f776ccf0d08da2d3b670e5b2ad550ea6@eucas1p1.samsung.com>
2018-01-16 16:16 ` [PATCH] crypto: mxs-dcp: Add empty hash export and import Kamil Konieczny
2018-01-16 16:56 ` Marek Vasut
2018-01-16 17:33 ` Kamil Konieczny
2018-01-16 17:28 ` Fabio Estevam
2018-01-16 18:28 ` Kamil Konieczny
2018-01-18 17:53 ` Kamil Konieczny [this message]
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=87da7572-a9a1-3fd1-e916-0cd5b161cfda@partner.samsung.com \
--to=k.konieczny@partner.samsung.com \
--cc=b.zolnierkie@samsung.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marex@denx.de \
/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