crypto: s390/hmac - Generate intermediate CV for API partial block handling

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: 08811169ac ("crypto: s390/hmac - Use API partial block handling")
Signed-off-by: Holger Dengler <dengler@linux.ibm.com>
Reviewed-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Holger Dengler 2026-08-14 16:20:10 +02:00 committed by Herbert Xu
parent 53cf0f26ee
commit 10396a2d6d

View File

@ -150,7 +150,10 @@ static int hash_data(const u8 *in, unsigned int inlen,
#undef PARAM_INIT
cpacf_klmd(func, &param, in, inlen);
if (final)
cpacf_klmd(func, &param, in, inlen);
else
cpacf_kimd(func, &param, in, inlen);
memcpy(digest, &param, digestsize);