mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kamil Konieczny <k.konieczny@partner.samsung.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "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: n2_core: Add empty hash export and import
Date: Thu, 18 Jan 2018 18:53:41 +0100	[thread overview]
Message-ID: <99689cdf-781f-9e24-7fcd-e810e30c57f2@partner.samsung.com> (raw)
In-Reply-To: <d46bfcf3-8c75-c7cd-ed6a-98ae8d9cdcaf@partner.samsung.com>

Please drop this as I will resend it as part of patchset.

On 16.01.2018 17:18, 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/n2_core.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c
> index 662e709812cc..80e9c842aad4 100644
> --- a/drivers/crypto/n2_core.c
> +++ b/drivers/crypto/n2_core.c
> @@ -359,6 +359,16 @@ static int n2_hash_async_finup(struct ahash_request *req)
>  	return crypto_ahash_finup(&rctx->fallback_req);
>  }
>  
> +static int n2_hash_async_noimport(struct ahash_request *req, const void *in)
> +{
> +	return -ENOSYS;
> +}
> +
> +static int n2_hash_async_noexport(struct ahash_request *req, void *out)
> +{
> +	return -ENOSYS;
> +}
> +
>  static int n2_hash_cra_init(struct crypto_tfm *tfm)
>  {
>  	const char *fallback_driver_name = crypto_tfm_alg_name(tfm);
> @@ -1467,6 +1477,8 @@ static int __n2_register_one_ahash(const struct n2_hash_tmpl *tmpl)
>  	ahash->final = n2_hash_async_final;
>  	ahash->finup = n2_hash_async_finup;
>  	ahash->digest = n2_hash_async_digest;
> +	ahash->export = n2_hash_async_noexport;
> +	ahash->import = n2_hash_async_noimport;
>  
>  	halg = &ahash->halg;
>  	halg->digestsize = tmpl->digest_size;
> 

-- 
Best regards,
Kamil Konieczny
Samsung R&D Institute Poland

      reply	other threads:[~2018-01-18 17:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180116161844eucas1p27634e8860ca620b45224fa9efe491e2c@eucas1p2.samsung.com>
2018-01-16 16:18 ` 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=99689cdf-781f-9e24-7fcd-e810e30c57f2@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 \
    /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

all inboxes | Powered by JetHome®