From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796540873; b=UsixZvLUz8oEcu5QVXYiwNSEYK846tFVd0G1JWY2LG2M/9i8tkHqWfTO9H3Uo4mVdUkR yw2EzqQzVBMTtXNnQp8oVFXDYPHxPF94aFmOOHi6KO7DphHBhrsSed9uQMBhy6cKgUQmO /y61iUVerOtKdLQ8X/EOGKOYgp1FcbRF9jmT8TeTQq+xP92zFf3ulcggWbAGK5oEMEF3m ug1maeQCo/PjMoK80bmMzqTAczW3vGVHS1TxJ+0XAJDmQyH8yvd86RgS5JLZ2HjNjEVJO R2ZCLZOM4h+25h7rSU3huE2F2xuY4pT+QIc3K86qxtU+QCWc3LQOzEAWLIWwGIXOq0A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796540873; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=Ert0jvH9BeEjcsEecIC4buQyb19mpuy3CFpQh6wrnVI=; b=u5ChipQwfPc3UHaExcSiYbc+LvrnytG5ibYVyFzjvH/EDSqq6m19r4wSLAlN2le8Rjvb oWkDas8bEXCECgQwuXI8EdCuCPMNGeYpZQEnEj9i3P45GxAtKzZzXc4QThFxZY0ksQzVx Hj5OcLQHQehaI6yWkMY2QdbiAMuDSnFNO5E8xNBZj6njRqRyMLs7xHXqzAVOHAP4v3GDI vbPih6IJUYCeYnApWL1j8HiPKph0QNYS2lqFzY78R2UMe4nYN96PdddMoiBPE13W3/Y5k ZwX7xZtzgXrwVpIAXDshcURwqnBshRO7RXlqriiFeGfCHZTDzvnpHL2lvXacd/37ktQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=oM9h7i4X; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F248B606A31F for ; Sun, 6 Dec 2026 07:07:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=oM9h7i4X Received: by smtp.kernel.org (Postfix) with ESMTPSA id 617211F0092B; Sun, 6 Dec 2026 07:07:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796540872; bh=Ert0jvH9BeEjcsEecIC4buQyb19mpuy3CFpQh6wrnVI=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=oM9h7i4XmfMCCdLKZhmCZj5LpgBKFxsKL944aYLthc40CsAaeSmT8ZHl4Nja6KAnJ hdfslRRv2MOgh8aoFNMK7F4EtPN3wtfafzmiPyTyQdc9ZBwlG662D0WZbZwrY3aFG8 N5GtEB4KTgigWE6Tf3Vq3XcWwQZRxCy4Lx315IketSJxt2DHhLxjCHKoNahbFl9Z0L f5OHF8Eq9czAZePw0/hud/7HmeSiPxGSubqajXPlIg3UpCJ1hDz+cs4tIjBlGf1DFf bvcCHfV+Xgl9m1i3AXUp9S2Ml7OX5tqsD2MBxIHgEXWQ/BMPG/0DkS2uGjsIYZN91H Av4M3jTdxw54Q== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] lib/crypto: tests: Test some longer lengths in skcipher tests Reply-To: sashiko-reviews@lists.linux.dev To: "Eric Biggers" , linux-crypto@vger.kernel.org Cc: "Ard Biesheuvel" , "Jason A . Donenfeld" , "Herbert Xu" In-Reply-To: <20261206065824.452509-1-ebiggers@kernel.org> References: <20261206065824.452509-1-ebiggers@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 06 Dec 2026 07:07:51 +0000 X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] lib/crypto: tests: order-4 kmalloc() in test_skcipher_monte_carlo() -- commit 21b28950dc01e2cbd959553b9ea1f78a12029eae Author: Eric Biggers lib/crypto: tests: Test some longer lengths in skcipher tests This commit extends test_skcipher_monte_carlo() and gen-skcipher-testvecs.py to test additional data lengths from 4096 up to 65536 bytes, and updates the expected Monte-Carlo checksums in the six AES skcipher KUnit test suites. > diff --git a/lib/crypto/tests/skcipher-test-template.h b/lib/crypto/tests= /skcipher-test-template.h > index e68be28b003b9..268af5f381426 100644 > --- a/lib/crypto/tests/skcipher-test-template.h > +++ b/lib/crypto/tests/skcipher-test-template.h > @@ -394,15 +394,20 @@ static void test_skcipher_all_key_lens(struct kunit= *test) [ ... ] > static void test_skcipher_monte_carlo(struct kunit *test) > { > - const size_t max_data_len =3D 1024; > + static const size_t extra_lens[] =3D { > + 4096, 4111, 8192, 16384, 16400, 32752, 32767, > + 32768, 32769, 32784, 49152, 65520, 65535, 65536, > + }; > + const size_t max_data_len =3D 65536; > u8 raw_key[SKCIPHER_MAX_KEY_LEN]; > u8 orig_iv[SKCIPHER_IV_BUF_SIZE]; > u8 iv[SKCIPHER_IV_BUF_SIZE]; [Severity: Low] Can the three 64 KiB alloc_buf() allocations for pt, ct, and decrypted fail under memory fragmentation? alloc_buf() calls kunit_kmalloc(test, size, GFP_KERNEL) with no vmalloc fallback. On 4 KiB page systems, 65536 bytes is an order-4 allocation, above PAGE_ALLOC_COSTLY_ORDER (3). Without __GFP_RETRY_MAYFAIL, __alloc_pages_slowpath() skips reclaim and compaction retries under fragmentation and returns NULL, causing spurious KUNIT_ASSERT_NOT_NULL() test failures. Using a kvmalloc()/vmalloc()-backed helper such as alloc_guarded_buf() would avoid order-4 physically contiguous allocations here. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261206065824.4525= 09-1-ebiggers@kernel.org?part=3D1