public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
* Warning at crypto/testmgr.c:5900, while booting to OS
@ 2024-06-12  6:46 Venkat Rao Bagalkote
  2024-06-13 21:01 ` Stefan Berger
  2024-07-01 14:45 ` Jarkko Sakkinen
  0 siblings, 2 replies; 4+ messages in thread
From: Venkat Rao Bagalkote @ 2024-06-12  6:46 UTC (permalink / raw)
  To: stefanb, jarkko, herbert; +Cc: linux-crypto, linux-kernel

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Warning at crypto/testmgr.c:5900, while booting to OS
  2024-06-12  6:46 Warning at crypto/testmgr.c:5900, while booting to OS Venkat Rao Bagalkote
@ 2024-06-13 21:01 ` Stefan Berger
  2024-07-01 14:45 ` Jarkko Sakkinen
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Berger @ 2024-06-13 21:01 UTC (permalink / raw)
  To: Venkat Rao Bagalkote, jarkko, herbert; +Cc: linux-crypto, linux-kernel



On 6/12/24 02:46, Venkat Rao Bagalkote wrote:
> 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.

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.

> 
> After reverting the above patch, issue is not seen.
> 
> Regards,
> Venkat.
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Warning at crypto/testmgr.c:5900, while booting to OS
  2024-06-12  6:46 Warning at crypto/testmgr.c:5900, while booting to OS Venkat Rao Bagalkote
  2024-06-13 21:01 ` Stefan Berger
@ 2024-07-01 14:45 ` Jarkko Sakkinen
  2024-07-01 14:49   ` Conor Dooley
  1 sibling, 1 reply; 4+ messages in thread
From: Jarkko Sakkinen @ 2024-07-01 14:45 UTC (permalink / raw)
  To: Venkat Rao Bagalkote, stefanb, herbert; +Cc: linux-crypto, linux-kernel

On Wed, 2024-06-12 at 12:16 +0530, Venkat Rao Bagalkote wrote:
> 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.

> Regards,
> Venkat.

[1]
commit 22a40d14b572deb80c0648557f4bd502d7e83826 (tag: v6.10-rc6, mainline/master)
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sun Jun 30 14:40:44 2024 -0700

    Linux 6.10-rc6

BR, Jarkko

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Warning at crypto/testmgr.c:5900, while booting to OS
  2024-07-01 14:45 ` Jarkko Sakkinen
@ 2024-07-01 14:49   ` Conor Dooley
  0 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2024-07-01 14:49 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: Venkat Rao Bagalkote, stefanb, herbert, linux-crypto,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]

Just a passer-by...

On Mon, Jul 01, 2024 at 02:45:28PM +0000, Jarkko Sakkinen wrote:
> On Wed, 2024-06-12 at 12:16 +0530, Venkat Rao Bagalkote wrote:
> > 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.

It's in linux-next I think:
commit 2fd2a82ccbfc106aec314db6c4bda5e24fd32a22
Author: Stefan Berger <stefanb@linux.ibm.com>
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.
    
    Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
    Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-01 14:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-12  6:46 Warning at crypto/testmgr.c:5900, while booting to OS Venkat Rao Bagalkote
2024-06-13 21:01 ` Stefan Berger
2024-07-01 14:45 ` Jarkko Sakkinen
2024-07-01 14:49   ` Conor Dooley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox