From: "Diederik de Haas" <didi.debian@cknow.org>
To: "Eric Biggers" <ebiggers@kernel.org>
Cc: <linux-crypto@vger.kernel.org>,
<linux-rockchip@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
"Corentin Labbe" <clabbe@baylibre.com>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 3/7] crypto: testmgr - replace CRYPTO_MANAGER_DISABLE_TESTS with CRYPTO_SELFTESTS
Date: Fri, 13 Jun 2025 09:57:32 +0200 [thread overview]
Message-ID: <DAL8UI7TH6IJ.2EVGYOYRQSS89@cknow.org> (raw)
In-Reply-To: <20250611163430.GA1254@sol>
[-- Attachment #1: Type: text/plain, Size: 2811 bytes --]
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@kernel.org/ 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@gondor.apana.org.au/
>> [ 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@cknow.org/
and v2 of that patch can be found here:
https://lore.kernel.org/linux-crypto/20250612174709.26990-1-ebiggers@kernel.org/
Cheers,
Diederik
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: "Diederik de Haas" <didi.debian@cknow.org>
To: "Eric Biggers" <ebiggers@kernel.org>
Cc: <linux-crypto@vger.kernel.org>,
<linux-rockchip@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
"Corentin Labbe" <clabbe@baylibre.com>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 3/7] crypto: testmgr - replace CRYPTO_MANAGER_DISABLE_TESTS with CRYPTO_SELFTESTS
Date: Fri, 13 Jun 2025 09:57:32 +0200 [thread overview]
Message-ID: <DAL8UI7TH6IJ.2EVGYOYRQSS89@cknow.org> (raw)
In-Reply-To: <20250611163430.GA1254@sol>
[-- Attachment #1.1: Type: text/plain, Size: 2811 bytes --]
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@kernel.org/ 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@gondor.apana.org.au/
>> [ 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@cknow.org/
and v2 of that patch can be found here:
https://lore.kernel.org/linux-crypto/20250612174709.26990-1-ebiggers@kernel.org/
Cheers,
Diederik
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2025-06-13 9:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-05 20:33 [PATCH v3 0/7] Clean up the crypto testing options Eric Biggers
2025-05-05 20:33 ` [PATCH v3 1/7] crypto: tcrypt - rename CRYPTO_TEST to CRYPTO_BENCHMARK Eric Biggers
2025-05-08 12:59 ` Geert Uytterhoeven
2025-05-05 20:33 ` [PATCH v3 2/7] crypto: testmgr - remove panic_on_fail Eric Biggers
2025-05-05 20:33 ` [PATCH v3 3/7] crypto: testmgr - replace CRYPTO_MANAGER_DISABLE_TESTS with CRYPTO_SELFTESTS Eric Biggers
2025-06-11 11:41 ` Diederik de Haas
2025-06-11 11:41 ` Diederik de Haas
2025-06-11 16:34 ` Eric Biggers
2025-06-11 16:34 ` Eric Biggers
2025-06-13 7:57 ` Diederik de Haas [this message]
2025-06-13 7:57 ` Diederik de Haas
2025-05-05 20:33 ` [PATCH v3 4/7] crypto: testmgr - make it easier to enable the full set of tests Eric Biggers
2025-05-05 20:33 ` [PATCH v3 5/7] crypto: testmgr - rename noextratests to noslowtests Eric Biggers
2025-05-05 20:33 ` [PATCH v3 6/7] crypto: Kconfig - make CRYPTO_MANAGER a hidden symbol Eric Biggers
2025-05-05 20:33 ` [PATCH v3 7/7] crypto: testmgr - enable CRYPTO_MANAGER when CRYPTO_SELFTESTS Eric Biggers
2025-05-12 5:46 ` [PATCH v3 0/7] Clean up the crypto testing options Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DAL8UI7TH6IJ.2EVGYOYRQSS89@cknow.org \
--to=didi.debian@cknow.org \
--cc=clabbe@baylibre.com \
--cc=ebiggers@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.