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=1796540884; b=iEofGs1++Y2Qpu1E+MabBKt+k4vt36mVsH+B6NRHCRr4ReQgPm91dy/Yfa3rBe6dzhBA gPlhfdOgxc+r8jtZoDwmic3kl3zMizmZ7mdI4kwC7ZRATnpY0y58T4NQ+ah3PvIXQhekL VZjcs002/5GdGsi8atbpupMNuolxL6GSL4AkA9k2MIHcEFXjv5wzKBclid6786KobLvnZ VCnJNICNacS3zRQSLFROHAkqecmCXLvsTUoR5+JnM2jgqvxPdGLuKUES8b+Xxe+JCzfsk CDy1swmNBa3m/KBs5SbZ0gjSoW2GDwgm8su/qX+AuTi5UX4jK+JXypRxfMwm3yRjj8A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796540884; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=SNj7pdWTe5lJWRz1kZKzNmQO/P6lx+Nj1ID9ZgVGO1U=; b=xyqg68o63B5OpKXQ5J83Z9wJ5uRoePO0NE/ncysbk4NbHl5kF+1re6npJt2WvftTFZRP /mhMC98ZP0S4QHmWkkadbh0Ja3qZ6LzzWGclWjqoNlq/oimEsoXsuJ5LPiBi3Lgqp+3Gd TudT1AeW9uB1xTqsMRAqLeKWBtwXMe0SBEJIbdJ+w/Z2u8fhUZDs2+L45jZUuIjbwu6Yk 4cfgsilipZEAktm/5qdXGec6mCi3stw8uX/x9ugS/4nVYHlWSAc0W1reIzC2YynvPATpB xPwDzY1/3xnwXv6sGtdpikgyfTEeY3zFKEqW9EJr6CT7QnHyjSixZ873GrHeJ61tC7w== 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=Btkp14df; 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 EB313606A31F for ; Sun, 6 Dec 2026 07:08:03 +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=Btkp14df Received: by smtp.kernel.org (Postfix) with ESMTPSA id A12021F0093B; Sun, 6 Dec 2026 07:08:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796540883; bh=SNj7pdWTe5lJWRz1kZKzNmQO/P6lx+Nj1ID9ZgVGO1U=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Btkp14dfsSCnjQt96I45/hvsZWQCoImdmTnfHl3kBYdceF2eeyCPd90c+nZ/CZ8PZ jahPfsWytHQbrD7p6bvauIRAqcVWXk2ih9BlDzkkNLjvX9yBZ2U/HTIAfeZXwkPX4K 2xIwV+sjXuiYSzkE4i+RRf3TbxKiLMYSZM5xWjoaHHJCwb8TOeyC4RDc5AikxYxWN1 68gzDEj4k6r/7NvmtPK0qQnadRVxyJ421vKRycvMUWlzdzE+3SJ/5OGRsqDmc6rZ6E Tf3KTTf0RljYjLOFeT/Hrcr+y5r9Infh5+rl4+9JnGKa1nf607+NEYoFuT6ijX7cEb HdRBcCwvIBIOQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] lib/crypto: tests: Test some longer lengths in AEAD 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: <20261206065847.452749-1-ebiggers@kernel.org> References: <20261206065847.452749-1-ebiggers@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 06 Dec 2026 07:08:03 +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: order-4 kmalloc() in test_aead_monte_carlo() exceeds costly order -- commit 55dddd51268c30bf76d6b3b8102ea572f5972e8b Author: Eric Biggers lib/crypto: tests: Test some longer lengths in AEAD tests This commit extends test_aead_monte_carlo() and gen-aead-testvecs.py to test additional data and associated data lengths up to 65536 bytes, and updates the expected AES-CCM and AES-GCM Monte-Carlo checksums. > diff --git a/lib/crypto/tests/aead-test-template.h b/lib/crypto/tests/aea= d-test-template.h > index 7689567c86f9b..a841a51bc3426 100644 > --- a/lib/crypto/tests/aead-test-template.h > +++ b/lib/crypto/tests/aead-test-template.h > @@ -738,13 +738,21 @@ static void test_aead_inplace(struct kunit *test) [ ... ] > static void test_aead_monte_carlo(struct kunit *test) > { > - const size_t max_data_len =3D 1024; > - const size_t max_ad_len =3D 293; > + 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; > + const size_t max_ad_len =3D 65536; [Severity: Low] Can raising max_data_len and max_ad_len to 65536 cause spurious failures in test_aead_monte_carlo() under memory fragmentation? pt, ct, decrypted, and ad are allocated via alloc_buf(), which calls kunit_kmalloc(..., GFP_KERNEL) and asserts non-NULL. On 4 KiB page kernels, each 65536-byte allocation is an order-4 physically contiguous request above PAGE_ALLOC_COSTLY_ORDER (3). Because plain GFP_KERNEL omits __GFP_RETRY_MAYFAIL, loading the AES-CCM or AES-GCM KUnit modules on a fragmented system can fail any of these four allocations. Using alloc_guarded_buf() or a kvmalloc()-backed helper would avoid order-4 allocations. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261206065847.4527= 49-1-ebiggers@kernel.org?part=3D1