[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aAqhbdiLmkHV350S@Red>
Date: Thu, 24 Apr 2025 22:39:09 +0200
From: Corentin Labbe <clabbe.montjoie@...il.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] crypto: Remove CRYPTO_ALG_ENGINE bit
Le Thu, Apr 24, 2025 at 10:42:51PM +0800, Herbert Xu a écrit :
> On Thu, Apr 24, 2025 at 02:09:34PM +0200, Corentin Labbe wrote:
> >
> > Example on x86_64:
> > [ 4.637589] BUG: kernel NULL pointer dereference, address: 0000000000000000
> > [ 4.637822] #PF: supervisor instruction fetch in kernel mode
> > [ 4.637931] #PF: error_code(0x0010) - not-present page
> > [ 4.638166] PGD 0 P4D 0
> > [ 4.638359] Oops: Oops: 0010 [#1] SMP NOPTI
> > [ 4.638808] CPU: 0 UID: 0 PID: 64 Comm: virtio1-engine Not tainted 6.15.0-rc1-g63dc06cd12f9 #1 PREEMPT(voluntary)
>
> This patch should fix the crypto_engine failures:
>
> ---8<---
> Remove the private and obsolete CRYPTO_ALG_ENGINE bit which is
> conflicting with the new CRYPTO_ALG_DUP_FIRST bit.
>
> Reported-by: Corentin Labbe <clabbe.montjoie@...il.com>
> Fixes: f1440a90465b ("crypto: api - Add support for duplicating algorithms before registration")
> Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>
>
Thanks it fixes my crypto hw devices.
So Tested-by: Corentin LABBE <clabbe.montjoie@...il.com>
But I still got some crash with blake2b:
+[ 54.348477] alg: shash: blake2b-256-neon test failed (wrong result) on test vector 1, cfg="init+update+final aligned buffer"
+[ 54.348525] alg: self-tests for blake2b-256 using blake2b-256-neon failed (rc=-22)
+[ 54.348536] ------------[ cut here ]------------
+[ 54.348545] WARNING: CPU: 1 PID: 909 at crypto/testmgr.c:5871 alg_test+0x644/0x654
+[ 54.348575] alg: self-tests for blake2b-256 using blake2b-256-neon failed (rc=-22)
+[ 54.348583] Modules linked in: blake2b_neon(+) blake2b_generic rmd160 xxhash_generic ccm gcm crypto_null ghash_generic ghash_arm_ce camellia_generic fcrypt pcbc anubis wp512 khazad tea michael_mic arc4 libarc4 cast6_generic cast5_generic cast_common xctr serpent_generic lrw gf128mul twofish_generic twofish_common blowfish_generic blowfish_common md4 md5 tcrypt(+) cfg80211 bluetooth ecdh_generic ecc ctr sun8i_drm_hdmi uas des_generic libdes sun4i_codec snd_soc_core ac97_bus snd_pcm_dmaengine snd_pcm snd_timer snd lima drm_shmem_helper dw_hdmi gpu_sched aes_arm_bs aes_arm soundcore sunxi musb_hdrc sun4i_drm sun4i_frontend sun4i_tcon sun8i_mixer sun8i_ce sun8i_tcon_top drm_dma_helper display_connector
+[ 54.348927] CPU: 1 UID: 0 PID: 909 Comm: cryptomgr_test Not tainted 6.15.0-rc1-g0ba1b8bdf183 #22 NONE
+[ 54.348941] Hardware name: Allwinner sun8i Family
+[ 54.348947] Call trace:
+[ 54.348961] unwind_backtrace from show_stack+0x10/0x14
+[ 54.348989] show_stack from dump_stack_lvl+0x54/0x68
+[ 54.349010] dump_stack_lvl from __warn+0x7c/0x128
+[ 54.349035] __warn from warn_slowpath_fmt+0x124/0x18c
+[ 54.349059] warn_slowpath_fmt from alg_test+0x644/0x654
+[ 54.349081] alg_test from cryptomgr_test+0x18/0x38
+[ 54.349097] cryptomgr_test from kthread+0x10c/0x238
+[ 54.349121] kthread from ret_from_fork+0x14/0x28
+[ 54.349140] Exception stack(0xf0aa9fb0 to 0xf0aa9ff8)
+[ 54.349151] 9fa0: 00000000 00000000 00000000 00000000
+[ 54.349162] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
+[ 54.349171] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
+[ 54.349177] ---[ end trace 0000000000000000 ]---
Regards
Powered by blists - more mailing lists