From: Harald Freudenberger <freude@linux.ibm.com>
To: Holger Dengler <dengler@linux.ibm.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
linux-s390@vger.kernel.org, Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Eric Biggers <ebiggers@kernel.org>,
linux-crypto@vger.kernel.org, ifranzki@linux.ibm.com
Subject: Re: [PATCH v1 1/1] s390/crypto: Generate intermediate CV for API partial block handling
Date: Fri, 14 Aug 2026 16:29:28 +0200 [thread overview]
Message-ID: <70e743d71eea0186c56b428a316a8d09@linux.ibm.com> (raw)
In-Reply-To: <20260814142010.259918-2-dengler@linux.ibm.com>
On 2026-08-14 16:20, Holger Dengler wrote:
> The API partial block handling requires a intermediate chaining
> value (CV). The internal function hash_data() sets the function code
> correctly, so also call cpacf_kimd() instruction for intermediate CV
> generation, as cpacf_klmd() always generate the final hash value.
>
> Cc: stable@vger.kernel.org # 6.15+
> Fixes: 08811169ac01 ("crypto: s390/hmac - Use API partial block
> handling")
> Signed-off-by: Holger Dengler <dengler@linux.ibm.com>
> ---
> arch/s390/crypto/hmac_s390.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/arch/s390/crypto/hmac_s390.c
> b/arch/s390/crypto/hmac_s390.c
> index f8cd09f341d4..445fa7bbd958 100644
> --- a/arch/s390/crypto/hmac_s390.c
> +++ b/arch/s390/crypto/hmac_s390.c
> @@ -150,7 +150,10 @@ static int hash_data(const u8 *in, unsigned int
> inlen,
>
> #undef PARAM_INIT
>
> - cpacf_klmd(func, ¶m, in, inlen);
> + if (final)
> + cpacf_klmd(func, ¶m, in, inlen);
> + else
> + cpacf_kimd(func, ¶m, in, inlen);
>
> memcpy(digest, ¶m, digestsize);
Reviewed-by: Harald Freudenberger <freude@linux.ibm.com>
prev parent reply other threads:[~2026-08-14 14:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 14:20 [PATCH v1 0/1] s390/crypto: Generate iintermediate chaining value on export Holger Dengler
2026-08-14 14:20 ` [PATCH v1 1/1] s390/crypto: Generate intermediate CV for API partial block handling Holger Dengler
2026-08-14 14:29 ` Harald Freudenberger [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=70e743d71eea0186c56b428a316a8d09@linux.ibm.com \
--to=freude@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=dengler@linux.ibm.com \
--cc=ebiggers@kernel.org \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=herbert@gondor.apana.org.au \
--cc=ifranzki@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;
as well as URLs for NNTP newsgroup(s).