[ Sasha's backport helper bot ]
Hi,
✅ All tests passed successfully. No issues detected. No action required from the submitter.
The upstream commit SHA1 provided is correct: 68279380266a5fa70e664de754503338e2ec3f43
Status in newer kernel trees: 6.15.y | Not found
Note: The patch differs from the upstream commit: --- 1: 68279380266a5 ! 1: 99e83b12f4bdf crypto: s390/sha - Fix uninitialized variable in SHA-1 and SHA-2 @@ Metadata ## Commit message ## crypto: s390/sha - Fix uninitialized variable in SHA-1 and SHA-2
+ commit 68279380266a5fa70e664de754503338e2ec3f43 upstream. + Commit 88c02b3f79a6 ("s390/sha3: Support sha3 performance enhancements") added the field s390_sha_ctx::first_message_part and made it be used by s390_sha_update() (now s390_sha_update_blocks()). At the time, @@ arch/s390/crypto/sha1_s390.c: static int s390_sha1_init(struct shash_desc *desc) return 0; } @@ arch/s390/crypto/sha1_s390.c: static int s390_sha1_import(struct shash_desc *desc, const void *in) - sctx->count = ictx->count; memcpy(sctx->state, ictx->state, sizeof(ictx->state)); + memcpy(sctx->buf, ictx->buffer, sizeof(ictx->buffer)); sctx->func = CPACF_KIMD_SHA_1; + sctx->first_message_part = 0; return 0; }
+ ## arch/s390/crypto/sha256_s390.c ## +@@ arch/s390/crypto/sha256_s390.c: static int s390_sha256_init(struct shash_desc *desc) + sctx->state[7] = SHA256_H7; + sctx->count = 0; + sctx->func = CPACF_KIMD_SHA_256; ++ sctx->first_message_part = 0; + + return 0; + } +@@ arch/s390/crypto/sha256_s390.c: static int sha256_import(struct shash_desc *desc, const void *in) + memcpy(sctx->state, ictx->state, sizeof(ictx->state)); + memcpy(sctx->buf, ictx->buf, sizeof(ictx->buf)); + sctx->func = CPACF_KIMD_SHA_256; ++ sctx->first_message_part = 0; + return 0; + } + +@@ arch/s390/crypto/sha256_s390.c: static int s390_sha224_init(struct shash_desc *desc) + sctx->state[7] = SHA224_H7; + sctx->count = 0; + sctx->func = CPACF_KIMD_SHA_256; ++ sctx->first_message_part = 0; + + return 0; + } + ## arch/s390/crypto/sha512_s390.c ## @@ arch/s390/crypto/sha512_s390.c: static int sha512_init(struct shash_desc *desc) + *(__u64 *)&ctx->state[14] = SHA512_H7; ctx->count = 0; - ctx->sha512.count_hi = 0; ctx->func = CPACF_KIMD_SHA_512; + ctx->first_message_part = 0;
return 0; } @@ arch/s390/crypto/sha512_s390.c: static int sha512_import(struct shash_desc *desc, const void *in) - memcpy(sctx->state, ictx->state, sizeof(ictx->state)); + memcpy(sctx->buf, ictx->buf, sizeof(ictx->buf)); sctx->func = CPACF_KIMD_SHA_512; + sctx->first_message_part = 0; return 0; }
@@ arch/s390/crypto/sha512_s390.c: static int sha384_init(struct shash_desc *desc) + *(__u64 *)&ctx->state[14] = SHA384_H7; ctx->count = 0; - ctx->sha512.count_hi = 0; ctx->func = CPACF_KIMD_SHA_512; + ctx->first_message_part = 0;
---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-6.12.y | Success | Success | | stable/linux-6.15.y | Success | Success |