Hi Herbert,
On 10/11/23 22:28, Herbert Xu wrote:
On Wed, Oct 11, 2023 at 10:09:02PM -0500, Denis Kenzior wrote:
.
[denkenz@archdev linux]$ git checkout 63ba4d67594ad05b2c899b5a3a8cc7581052dd13
HEAD is now at 63ba4d67594a KEYS: asymmetric: Use new crypto interface
without scatterlists
No wonder I can't reproduce this. This is already fixed by
commit 3867caee497edf6ce6b6117aac1c0b87c0a2cb5f
Author: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Sat Jun 24 13:19:56 2023 +0800
crypto: sm2 - Provide sm2_compute_z_digest when sm2 is disabled
It's just a bisection artifact, you need to skip the broken commit
when bisecting.
Unfortunately that commit causes the unit test to crash the kernel.
bash-5.1# uname -a
Linux (none) 6.4.0-rc1-00082-g3867caee497e #37 Thu Oct 12 09:11:21 CDT 2023
x86_64 GNU/Linux
bash-5.1# unit/test-key
TEST: unsupported
TEST: user key
TEST: Diffie-Hellman 1
TEST: Diffie-Hellman 2
TEST: Diffie-Hellman 3
TEST: simple keyring
TEST: trusted keyring
Kernel panic - not syncing: Kernel mode fault at addr 0x18, ip 0x601fac3a
CPU: 0 PID: 28 Comm: test-key Not tainted 6.4.0-rc1-00082-g3867caee497e #37
Stack:
6232a840 6232d400 00000000 2000000100
62345e00 00000000 718b7aa0 718b7aa0
00000000 712851d8 10000000400 00000000
Call Trace:
[<602115cd>] public_key_verify_signature+0x272/0x2ed
[<60210503>] ? asymmetric_key_id_same+0x0/0x3b
[<602131d9>] x509_check_for_self_signed+0x65/0xe3
[<600bd2ca>] ? kfree+0x0/0x4a
[<6021242f>] x509_cert_parse+0x205/0x245
[<60212de2>] x509_key_preparse+0x28/0x237
[<6006820d>] ? __down_read_common+0x92/0xc4
[<602102f1>] asymmetric_key_preparse+0x50/0x7f
[<601eaa68>] __key_create_or_update+0x1c1/0x4d4
[<601ec7a1>] ? key_ref_put+0x0/0x16
[<601ead90>] key_create_or_update+0x15/0x17
[<601eccc2>] sys_add_key+0x183/0x1d8
[<60025c4d>] handle_syscall+0x99/0xc7
[<60038646>] userspace+0x4d3/0x60f
[<60021ac2>] fork_handler+0x92/0x94
Aborted (core dumped)
I managed to narrow things down a bit further:
[denkenz@archdev linux]$ git bisect good
There are only 'skip'ped commits left to test.
The first bad commit could be any of:
501e197a02d4aef157f53ba3a0b9049c3e52fedc
afa9d00ee0fda2387ad598d0b106e96a7ed360ae
b335f258e8ddafec0e8ae2201ca78d29ed8f85eb
3867caee497edf6ce6b6117aac1c0b87c0a2cb5f
d744ae7477190967a3ddc289e2cd4ae59e8b1237
63ba4d67594ad05b2c899b5a3a8cc7581052dd13
767cfee8368f43c6d6c58cdf8c2d143a027fa55f
891ebfdfa3d08bf55ebec523c99bb68ac9c34cf7
e5221fa6a355112ddcc29dc82a94f7c3a1aacc0b
486bfb05913ac9969a3a71a4dc48f17f31cb162d
We cannot bisect more!
Four of the above are hwrng related, so not the culprits.
Maybe?
891ebfdfa3d08bf55ebec523c99bb68ac9c34cf7
crypto: sig - Fix verify call
Regards,
-Denis