On Wed Jun 11, 2025 at 6:34 PM CEST, Eric Biggers wrote: > On Wed, Jun 11, 2025 at 01:41:06PM +0200, Diederik de Haas wrote: >> On Mon May 5, 2025 at 10:33 PM CEST, Eric Biggers wrote: >> > The negative-sense of CRYPTO_MANAGER_DISABLE_TESTS is a longstanding >> > mistake that regularly causes confusion. Especially bad is that you can >> > have CRYPTO=n && CRYPTO_MANAGER_DISABLE_TESTS=n, which is ambiguous. >> > >> > Replace CRYPTO_MANAGER_DISABLE_TESTS with CRYPTO_SELFTESTS which has the >> > expected behavior. >> > >> > The tests continue to be disabled by default. >> > --- >> > <snip> >> >> I built a 6.16-rc1 kernel [1] and its config is based upon Debian's and >> that has enabled CRYPTO_SELFTESTS [2] (due to Debian bug 599441 [3]). >> >> I then installed it on 3 Rockchip based devices and booted into that. >> 1. Radxa Rock 5B (rk3588) >> 2. PINE64 Quartz64 Model B (rk3568) >> 3. PINE64 RockPro64 (rk3399) >> >> The filtered dmesg output for Rock 5B: >> ERROR: >> [ 0.709822] basic hdkf test(hmac(sha256)): failed to allocate transform: -2 >> WARNING: > > https://lore.kernel.org/r/20250610191600.54994-1-ebiggers@xxxxxxxxxx/ fixed the > HKDF failure. It was caused by a patch that changed initcall levels. > >> [ 8.877288] alg: skcipher: skipping comparison tests for xctr-aes-ce because xctr(aes-generic) is unavailable > > That's expected if you have CONFIG_CRYPTO_AES_ARM64_CE_BLK enabled but > CONFIG_CRYPTO_XCTR disabled. Some tests are skipped in that case. Happy to report that with that patch and that config option, the error and warning are now gone. Thanks :-) PULL request for the patch is already sent to Linus: https://lore.kernel.org/linux-crypto/aEupSzhTI4h8kz-5@xxxxxxxxxxxxxxxxxxx/ >> [ 14.172991] alg: ahash: rk-sha1 export() overran state buffer on test vector 0, cfg="import/export" >> [ 14.202291] alg: ahash: rk-sha256 export() overran state buffer on test vector 0, cfg="import/export" >> [ 14.230887] alg: ahash: rk-md5 export() overran state buffer on test vector 0, cfg="import/export" > > That means the Rockchip crypto driver is broken. The crypto driver for rk3399 is still broken. > Anyway, the more interesting part of your email is that you pointed out that > Debian has the crypto self-tests enabled, precisely in order to automatically > disable buggy drivers like these. > > So I'll send a patch that adds back a kconfig knob to run the fast tests only, > which I had removed in commit 698de822780f. I responded about this to a new patch submission here: https://lore.kernel.org/linux-crypto/DAJXJHLY2ITB.3IBN23DX0RO4Z@xxxxxxxxx/ and v2 of that patch can be found here: https://lore.kernel.org/linux-crypto/20250612174709.26990-1-ebiggers@xxxxxxxxxx/ Cheers, Diederik
Attachment:
signature.asc
Description: PGP signature