Warning at crypto/testmgr.c:5900, while booting to OS
Greetings!!!
Observing Kernel Warnings while booting to OS at crypto/testmgr.c:5900.
Traces:
[ 0.682613] alg: akcipher: verify test failed. err -129
[ 0.682620] alg: akcipher: test 1 failed for ecdsa-nist-p521-generic, err=-129
[ 0.682626] alg: self-tests for ecdsa-nist-p521 using ecdsa-nist-p521-generic failed (rc=-129)
[ 0.682628] ------------[ cut here ]------------
[ 0.682634] alg: self-tests for ecdsa-nist-p521 using ecdsa-nist-p521-generic failed (rc=-129)
[ 0.682645] WARNING: CPU: 8 PID: 221 at crypto/testmgr.c:5900 alg_test.part.0+0xc88/0xe18
[ 0.682653] Modules linked in:
[ 0.682656] CPU: 8 PID: 221 Comm: cryptomgr_test Not tainted 6.10.0-rc3-next-20240611-auto #1
[ 0.682659] Hardware name: IBM,8375-42A POWER9 (raw) 0x4e0202 0xf000005 of:IBM,FW950.A0 (VL950_144) hv:phyp pSeries
[ 0.682660] NIP: c0000000007bf48c LR: c0000000007bf488 CTR: c00000000103ef20
[ 0.682662] REGS: c00000005dc3fb60 TRAP: 0700 Not tainted (6.10.0-rc3-next-20240611-auto)
[ 0.682664] MSR: 800000000282b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 28008241 XER: 00000005
[ 0.682672] CFAR: c00000000016361c IRQMASK: 0
GPR00: c0000000007bf488 c00000005dc3fe00 c000000001583800 0000000000000052
GPR04: 0000000000000000 c00000005dc3fc10 c00000005dc3fc08 0000000000000000
GPR08: c000000002797d38 0000000000000000 0000000000000001 0000000000000001
GPR12: c000000002a57e18 c00000000f7c6700 c0000000001a185c c00000000679a180
GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR20: 0000000000000000 0000000000000000 000000000000007d 000000000000007d
GPR24: ffffffffffffff7f c00000000e29d040 0000000000001f40 0000000000000006
GPR28: 0000000000000400 ffffffffffffff7f c00000000e29d080 c00000000e29d000
[ 0.682700] NIP [c0000000007bf48c] alg_test.part.0+0xc88/0xe18
[ 0.682703] LR [c0000000007bf488] alg_test.part.0+0xc84/0xe18
[ 0.682707] Call Trace:
[ 0.682708] [c00000005dc3fe00] [c0000000007bf488] alg_test.part.0+0xc84/0xe18 (unreliable)
[ 0.682713] [c00000005dc3ff60] [c0000000007b7ac4] cryptomgr_test+0x34/0x64
[ 0.682717] [c00000005dc3ff90] [c0000000001a198c] kthread+0x138/0x140
[ 0.682721] [c00000005dc3ffe0] [c00000000000df98] start_kernel_thread+0x14/0x18
[ 0.682724] Code: 60000000 7f7adb78 4bfffe00 60000000 60000000 3c62ffe7 7fe5fb78 7fc4f378 7fa6eb78 3863fd20 4b9a4111 60000000 <0fe00000> 4bfff7ec 60000000 60000000
[ 0.682735] ---[ end trace 0000000000000000 ]---This issue is being caused by the patch: 2fd2a82ccbfc106aec314db6c4bda5e24fd32a22.
After reverting the above patch, issue is not seen.
Regards,
Venkat.
Quoted 45 lines · Venkat Rao Bagalkote
Greetings!!!
Observing Kernel Warnings while booting to OS at
crypto/testmgr.c:5900.Traces:
[ 0.682613] alg: akcipher: verify test failed. err -129
[ 0.682620] alg: akcipher: test 1 failed for ecdsa-nist-p521-generic, err=-129
[ 0.682626] alg: self-tests for ecdsa-nist-p521 using ecdsa-nist-p521-generic failed (rc=-129)
[ 0.682628] ------------[ cut here ]------------
[ 0.682634] alg: self-tests for ecdsa-nist-p521 using ecdsa-nist-p521-generic failed (rc=-129)
[ 0.682645] WARNING: CPU: 8 PID: 221 atcrypto/testmgr.c:5900alg_test.part.0+0xc88/0xe18
[ 0.682653] Modules linked in:
[ 0.682656] CPU: 8 PID: 221 Comm:cryptomgr_testNot tainted 6.10.0-rc3-next-20240611-auto #1
[ 0.682659] Hardware name: IBM,8375-42A POWER9 (raw)0x4e02020xf000005of:IBM,FW950.A0 (VL950_144) hv:phyp pSeries
[ 0.682660] NIP:c0000000007bf48cLR:c0000000007bf488CTR:c00000000103ef20
[ 0.682662] REGS:c00000005dc3fb60TRAP: 0700 Not tainted (6.10.0-rc3-next-20240611-auto)
[ 0.682664] MSR:800000000282b033<SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 28008241 XER: 00000005
[ 0.682672] CFAR:c00000000016361cIRQMASK: 0
GPR00:c0000000007bf488c00000005dc3fe00c0000000015838000000000000000052
GPR04: 0000000000000000c00000005dc3fc10c00000005dc3fc080000000000000000
GPR08:c000000002797d380000000000000000
0000000000000001 0000000000000001
GPR12:c000000002a57e18c00000000f7c6700c0000000001a185cc00000000679a180
GPR16: 0000000000000000 0000000000000000
0000000000000000 0000000000000000
GPR20: 0000000000000000 0000000000000000000000000000007d000000000000007d
GPR24:ffffffffffffff7fc00000000e29d0400000000000001f400000000000000006
GPR28: 0000000000000400ffffffffffffff7fc00000000e29d080c00000000e29d000
[ 0.682700] NIP [c0000000007bf48c] alg_test.part.0+0xc88/0xe18
[ 0.682703] LR [c0000000007bf488] alg_test.part.0+0xc84/0xe18
[ 0.682707] Call Trace:
[ 0.682708] [c00000005dc3fe00] [c0000000007bf488] alg_test.part.0+0xc84/0xe18 (unreliable)
[ 0.682713] [c00000005dc3ff60] [c0000000007b7ac4]cryptomgr_test+0x34/0x64
[ 0.682717] [c00000005dc3ff90] [c0000000001a198c]kthread+0x138/0x140
[ 0.682721] [c00000005dc3ffe0] [c00000000000df98]start_kernel_thread+0x14/0x18
[ 0.682724] Code: 600000007f7adb784bfffe0060000000 600000003c62ffe77fe5fb787fc4f3787fa6eb783863fd204b9a411160000000 <0fe00000>4bfff7ec60000000 60000000 [ 0.682735] ---[ end trace 0000000000000000 ]---
Quoted 1 line
This issue is being caused by the patch:
2fd2a82ccbfc106aec314db6c4bda5e24fd32a22.
Thanks for the commit. I see the issue also on ppc64 but not on x86_64. It's an off-by one issue in c6ab5c915da460c not clearing the most significant digit when insufficient bytes are provided.
Quoted 6 lines
After reverting the above patch, issue is not seen.
Regards,
Venkat.
Quoted 3 lines · Venkat Rao Bagalkote
This issue is being caused by the patch:
2fd2a82ccbfc106aec314db6c4bda5e24fd32a22.After reverting the above patch, issue is not seen.
$ git show 2fd2a82ccbfc106aec314db6c4bda5e24fd32a22 # [1] fatal: bad object 2fd2a82ccbfc106aec314db6c4bda5e24fd32a22
Unless I made a mistake, for me it really looks like that the commit is non-existent.
Quoted 2 lines
Regards,
Venkat.
[1]
commit 22a40d14b572deb80c0648557f4bd502d7e83826 (tag: v6.10-rc6, mainline/master)
Author: Linus Torvalds <[email protected]> Date: Sun Jun 30 14:40:44 2024 -0700
Linux 6.10-rc6
BR, Jarkko
Conor Dooley
Reviewed-by Jarkko SakkinenJust a passer-by...
Quoted 10 lines · Jarkko Sakkinen
Quoted 3 lines · Venkat Rao Bagalkote
This issue is being caused by the patch:
2fd2a82ccbfc106aec314db6c4bda5e24fd32a22.After reverting the above patch, issue is not seen.
$ git show 2fd2a82ccbfc106aec314db6c4bda5e24fd32a22 # [1] fatal: bad object 2fd2a82ccbfc106aec314db6c4bda5e24fd32a22Unless I made a mistake, for me it really looks like that the commit is non-existent.
It's in linux-next I think:
commit 2fd2a82ccbfc106aec314db6c4bda5e24fd32a22
Author: Stefan Berger <[email protected]> Date: Wed May 29 19:08:26 2024 -0400
crypto: ecdsa - Use ecc_digits_from_bytes to create hash digits array
Since ecc_digits_from_bytes will provide zeros when an insufficient number of bytes are passed in the input byte array, use it to create the hash digits directly from the input byte array. This avoids going through an intermediate byte array (rawhash) that has the first few bytes filled with zeros.