Re: [PATCH] lib/crypto: tests: Fix KMSAN warning in test_sha256_finup_2x()

From: Eric Biggers

Date: Fri Nov 21 2025 - 13:27:21 EST


On Thu, Nov 20, 2025 at 07:34:31PM -0800, Eric Biggers wrote:
> Fully initialize *ctx, including the buf field which sha256_init()
> doesn't initialize, to avoid a KMSAN warning when comparing *ctx to
> orig_ctx. This KMSAN warning slipped in while KMSAN was not working
> reliably due to a stackdepot bug, which has now been fixed.
>
> Fixes: 6733968be7cb ("lib/crypto: tests: Add tests and benchmark for sha256_finup_2x()")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
> ---
> lib/crypto/tests/sha256_kunit.c | 1 +
> 1 file changed, 1 insertion(+)
>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=libcrypto-fixes
(I dropped the Cc stable. I'll just send it in for v6.18-rc7 instead.)

- Eric