From: Herbert Xu <herbert@gondor.apana.org.au>
To: Harald Freudenberger <freude@linux.ibm.com>
Cc: davem@davemloft.net, dengler@linux.ibm.com,
linux-s390@vger.kernel.org, linux-crypto@vger.kernel.org
Subject: Re: [PATCH v8 2/3] s390/crypto: New s390 specific protected key hash phmac
Date: Sat, 21 Dec 2024 16:57:10 +0800 [thread overview]
Message-ID: <Z2aC5g-7_yc6ziL4@gondor.apana.org.au> (raw)
In-Reply-To: <20241218140530.82581-3-freude@linux.ibm.com>
On Wed, Dec 18, 2024 at 03:05:28PM +0100, Harald Freudenberger wrote:
>
> +static void phmac_wq_init_fn(struct work_struct *work)
> +{
> + struct delayed_work *dwork = to_delayed_work(work);
> + struct s390_phmac_req_ctx *req_ctx =
> + container_of(dwork, struct s390_phmac_req_ctx, work);
> + struct ahash_request *req = req_ctx->req;
> + struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
> + struct s390_kmac_sha2_ctx *ctx = &req_ctx->sha2_ctx;
> + int rc;
> +
> + rc = phmac_init(tfm, ctx, true);
> +
> + pr_debug("req complete with rc=%d\n", rc);
> + crypto_request_complete(&req->base, rc);
This should be ahash_request_complete, and you should also call
local_bh_disable before calling it.
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2024-12-21 8:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 14:05 [PATCH v8 0/3] New s390 specific protected key hmac Harald Freudenberger
2024-12-18 14:05 ` [PATCH v8 1/3] s390/crypto: Add protected key hmac subfunctions for KMAC Harald Freudenberger
2024-12-18 14:05 ` [PATCH v8 2/3] s390/crypto: New s390 specific protected key hash phmac Harald Freudenberger
2024-12-21 8:57 ` Herbert Xu [this message]
2024-12-18 14:05 ` [PATCH v8 3/3] s390/crypto: Enable phmac selftest invocation Harald Freudenberger
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=Z2aC5g-7_yc6ziL4@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=davem@davemloft.net \
--cc=dengler@linux.ibm.com \
--cc=freude@linux.ibm.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-s390@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