Hi!

I tried to run tests/cipher-gcm (cryptodev-linux-1.7-3-gda73010) on Fedora fc23 using Linux kernel 4.2.3-300.fc23.x86_64. One of the encryption failed (aes_gcm_vectors[2] with auth field set). dmesg attached; steps to reproduce:

  # cd cryptodev-linux && make
  # insmod cryptodev.ko
  # sysctl ioctl.cryptodev_verbosity=3
  # ./tests/cipher-gcm

The same issue is apparently seen on Linux-4.2.1-300.fc23.x86_64 as well, but I cannot reproduce this on 4.1.6-100.fc21.x86_64.

If there is a way how to fix this, I will be very thankful.

Thank you & have a nice day!
Fridolin
[  164.153264] cryptodev: module verification failed: signature and/or required 
key missing - tainting kernel
[  164.163555] cryptodev: driver 1.7 loaded.
[  194.817238] cryptodev: cipher-gcm[3079] (cryptodev_open:480): allocated new 
item at ffff8800203b3b40
[  194.817241] cryptodev: cipher-gcm[3079] (cryptodev_open:480): allocated new 
item at ffff8800203b3cc0
[  194.817243] cryptodev: cipher-gcm[3079] (cryptodev_open:480): allocated new 
item at ffff8800203b36c0
[  194.817244] cryptodev: cipher-gcm[3079] (cryptodev_open:480): allocated new 
item at ffff8800203b3600
[  194.817245] cryptodev: cipher-gcm[3079] (cryptodev_open:480): allocated new 
item at ffff8800203b3000
[  194.817246] cryptodev: cipher-gcm[3079] (cryptodev_open:480): allocated new 
item at ffff8800203b3300
[  194.817248] cryptodev: cipher-gcm[3079] (cryptodev_open:480): allocated new 
item at ffff8800203b3840
[  194.817249] cryptodev: cipher-gcm[3079] (cryptodev_open:480): allocated new 
item at ffff8800203b39c0
[  194.817251] cryptodev: cipher-gcm[3079] (cryptodev_open:480): allocated new 
item at ffff8800203b33c0
[  194.817252] cryptodev: cipher-gcm[3079] (cryptodev_open:480): allocated new 
item at ffff8800203b3180
[  194.817253] cryptodev: cipher-gcm[3079] (cryptodev_open:480): allocated new 
item at ffff8800203b3e40
[  194.817255] cryptodev: cipher-gcm[3079] (cryptodev_open:480): allocated new 
item at ffff88003c6c7480
[  194.817256] cryptodev: cipher-gcm[3079] (cryptodev_open:480): allocated new 
item at ffff88003c6c7300
[  194.817257] cryptodev: cipher-gcm[3079] (cryptodev_open:480): allocated new 
item at ffff88003c6c7a80
[  194.817258] cryptodev: cipher-gcm[3079] (cryptodev_open:480): allocated new 
item at ffff88003c6c7f00
[  194.817260] cryptodev: cipher-gcm[3079] (cryptodev_open:480): allocated new 
item at ffff88003c6c7c00
[  194.817261] cryptodev: cipher-gcm[3079] (cryptodev_open:485): Cryptodev 
handle initialised, 16 elements in queue
[  194.862316] cryptodev: cipher-gcm[3079] (crypto_create_session:284): got 
alignmask 0
[  194.862321] cryptodev: cipher-gcm[3079] (crypto_create_session:287): 
preallocating for 32 user pages
[  194.862774] cryptodev: cipher-gcm[3079] (crypto_create_session:284): got 
alignmask 0
[  194.862777] cryptodev: cipher-gcm[3079] (crypto_create_session:287): 
preallocating for 32 user pages
[  194.862849] cryptodev: cipher-gcm[3079] (crypto_create_session:284): got 
alignmask 0
[  194.862851] cryptodev: cipher-gcm[3079] (crypto_create_session:287): 
preallocating for 32 user pages
[  194.862889] BUG: unable to handle kernel NULL pointer dereference at 
0000000000000014
[  194.862894] IP: [<ffffffff813bffbb>] scatterwalk_pagedone.part.8+0x3b/0x60
[  194.862900] PGD 3b753067 PUD 1b88f067 PMD 0 
[  194.862904] Oops: 0000 [#1] SMP 
[  194.862907] Modules linked in: gcm cryptodev(OE) ip6t_rpfilter ip6t_REJECT 
nf_reject_ipv6 xt_conntrack ebtable_filter ebtable_broute bridge stp llc 
ebtable_nat ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 
ip6table_raw ip6table_mangle ip6table_security ip6table_filter ip6_tables 
iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack 
iptable_raw iptable_mangle iptable_security snd_hda_codec_generic ppdev 
snd_hda_intel iosf_mbi crct10dif_pclmul snd_hda_codec crc32_pclmul crc32c_intel 
9pnet_virtio ghash_clmulni_intel snd_hda_core snd_hwdep 9pnet snd_seq 
snd_seq_device joydev virtio_balloon snd_pcm parport_pc parport pvpanic 
snd_timer snd acpi_cpufreq i2c_piix4 soundcore nfsd auth_rpcgss nfs_acl lockd 
grace sunrpc virtio_net virtio_console ata_generic vmwgfx
[  194.862957]  drm_kms_helper ttm drm virtio_pci serio_raw virtio_ring 
pata_acpi virtio
[  194.862965] CPU: 0 PID: 3079 Comm: cipher-gcm Tainted: G           OE   
4.2.3-300.fc23.x86_64+debug #1
[  194.862968] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 
1.7.5-20140709_153950- 04/01/2014
[  194.862970] task: ffff88003976aa40 ti: ffff880011dc0000 task.ti: 
ffff880011dc0000
[  194.862972] RIP: 0010:[<ffffffff813bffbb>]  [<ffffffff813bffbb>] 
scatterwalk_pagedone.part.8+0x3b/0x60
[  194.862976] RSP: 0018:ffff880011dc39b8  EFLAGS: 00010246
[  194.862977] RAX: 0000000000000000 RBX: ffff880011dc3ac8 RCX: ffff88001cc680b8
[  194.862979] RDX: 000000000000007c RSI: ffff88001193b07c RDI: ffff88001cc680b8
[  194.862981] RBP: ffff880011dc39c8 R08: ffff88003e3dad40 R09: ffff88003dc01b00
[  194.862983] R10: 0000000000000f8c R11: 0000000000000001 R12: ffff88003af4fd18
[  194.862985] R13: ffff88003976aa40 R14: 0000000000000008 R15: ffff880011dc3ac8
[  194.862987] FS:  00007f8f83bbe700(0000) GS:ffff88003e200000(0000) 
knlGS:0000000000000000
[  194.862989] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  194.862990] CR2: 0000000000000014 CR3: 000000003c0c7000 CR4: 00000000001406f0
[  194.862996] Stack:
[  194.862997]  ffff880011dc39c8 0000000000000008 ffff880011dc3a18 
ffffffff813c014e
[  194.863006]  ffff880011dc3a48 0000000000000008 ffff880011dc3ac8 
ffff880011dc3aa8
[  194.863009]  0000000000000010 0000000000000010 ffff880011dc3b88 
0000000000000000
[  194.863013] Call Trace:
[  194.863016]  [<ffffffff813c014e>] scatterwalk_copychunks+0x8e/0x180
[  194.863020]  [<ffffffff813c3e07>] blkcipher_walk_next+0x307/0x3f0
[  194.863020]  [<ffffffff813c3976>] blkcipher_walk_done+0x106/0x290
[  194.863020]  [<ffffffff810851e3>] ctr_crypt+0xb3/0x1f0
[  194.863020]  [<ffffffff8143124e>] ? sg_init_table+0x1e/0x80
[  194.863020]  [<ffffffff813e3b72>] __ablk_encrypt+0x52/0x70
[  194.863020]  [<ffffffff813e3bb4>] ablk_encrypt+0x24/0xa0
[  194.863020]  [<ffffffffa0422314>] crypto_gcm_encrypt+0xc4/0xf0 [gcm]
[  194.863020]  [<ffffffffa04131c2>] cryptodev_cipher_encrypt+0x82/0xf0 
[cryptodev]
[  194.863020]  [<ffffffffa0414c8b>] crypto_auth_run+0x36b/0xf50 [cryptodev]
[  194.863020]  [<ffffffffa041192a>] cryptodev_ioctl+0x26a/0x650 [cryptodev]
[  194.863020]  [<ffffffff813a0555>] ? inode_has_perm.isra.46+0x55/0xa0
[  194.863020]  [<ffffffff8128597e>] do_vfs_ioctl+0x2ee/0x550
[  194.863020]  [<ffffffff813a0c3b>] ? selinux_file_ioctl+0x5b/0xf0
[  194.863020]  [<ffffffff81285c59>] SyS_ioctl+0x79/0x90
[  194.863020]  [<ffffffff818727ae>] entry_SYSCALL_64_fastpath+0x12/0x76
[  194.863020] Code: 25 00 f0 ff ff 89 47 08 8b 51 14 03 51 10 39 d0 73 02 f3 
c3 55 48 89 e5 53 48 89 fb 48 89 cf 48 83 ec 08 e8 f8 0f 07 00 48 89 03 <8b> 50 
14 85 d2 74 0d 8b 40 10 89 43 08 48 83 c4 08 5b 5d c3 e8 
[  194.863020] RIP  [<ffffffff813bffbb>] scatterwalk_pagedone.part.8+0x3b/0x60
[  194.863020]  RSP <ffff880011dc39b8>
[  194.863020] CR2: 0000000000000014
[  194.863020] ---[ end trace 3bcc30be1f7ad49a ]---
[  194.863020] BUG: sleeping function called from invalid context at 
include/linux/sched.h:2739
[  194.863020] in_atomic(): 1, irqs_disabled(): 1, pid: 3079, name: cipher-gcm
[  194.863020] INFO: lockdep is turned off.
[  194.863020] irq event stamp: 2416
[  194.863020] hardirqs last  enabled at (2415): [<ffffffff811e8404>] 
bad_range+0x94/0x180
[  194.863020] hardirqs last disabled at (2416): [<ffffffff81874bd3>] 
error_entry_done+0x5/0x6
[  194.863020] softirqs last  enabled at (1902): [<ffffffff810b28aa>] 
__do_softirq+0x39a/0x630
[  194.863020] softirqs last disabled at (1897): [<ffffffff810b2d8a>] 
irq_exit+0x11a/0x120
[  194.863020] CPU: 0 PID: 3079 Comm: cipher-gcm Tainted: G      D    OE   
4.2.3-300.fc23.x86_64+debug #1
[  194.863020] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 
1.7.5-20140709_153950- 04/01/2014
[  194.863020]  0000000000000000 000000004a01437a ffff880011dc3618 
ffffffff81868ce6
[  194.863020]  0000000000000000 ffff88003976aa40 ffff880011dc3648 
ffffffff810db151
[  194.863020]  ffff880011dc36a8 ffffffff81c71335 0000000000000ab3 
0000000000000000
[  194.863020] Call Trace:
[  194.863020]  [<ffffffff81868ce6>] dump_stack+0x4c/0x65
[  194.863020]  [<ffffffff810db151>] ___might_sleep+0x181/0x240
[  194.863020]  [<ffffffff810db25d>] __might_sleep+0x4d/0x90
[  194.863020]  [<ffffffff810bf9c3>] exit_signals+0x33/0x150
[  194.863020]  [<ffffffff810af8d9>] do_exit+0xc9/0xc30
[  194.863020]  [<ffffffff8111f441>] ? kmsg_dump+0x151/0x1a0
[  194.863020]  [<ffffffff8111f324>] ? kmsg_dump+0x34/0x1a0
[  194.863020]  [<ffffffff810205fe>] oops_end+0x9e/0xd0
[  194.863020]  [<ffffffff810711a5>] no_context+0x135/0x390
[  194.863020]  [<ffffffff81071488>] __bad_area_nosemaphore+0x88/0x200
[  194.863020]  [<ffffffff810e7b7b>] ? sched_clock_local+0x1b/0x90
[  194.863020]  [<ffffffff81071613>] bad_area_nosemaphore+0x13/0x20
[  194.863020]  [<ffffffff81071915>] __do_page_fault+0xd5/0x470
[  194.863020]  [<ffffffff81109139>] ? __lock_acquire+0xcb9/0x1d00
[  194.863020]  [<ffffffff81071da2>] trace_do_page_fault+0x72/0x3f0
[  194.863020]  [<ffffffff81003030>] ? trace_hardirqs_off_thunk+0x17/0x19
[  194.863020]  [<ffffffff8106c16e>] do_async_page_fault+0x1e/0xc0
[  194.863020]  [<ffffffff818749f8>] async_page_fault+0x28/0x30
[  194.863020]  [<ffffffff813bffbb>] ? scatterwalk_pagedone.part.8+0x3b/0x60
[  194.863020]  [<ffffffff813bffb8>] ? scatterwalk_pagedone.part.8+0x38/0x60
[  194.863020]  [<ffffffff813c014e>] scatterwalk_copychunks+0x8e/0x180
[  194.863020]  [<ffffffff813c3e07>] blkcipher_walk_next+0x307/0x3f0
[  194.863020]  [<ffffffff813c3976>] blkcipher_walk_done+0x106/0x290
[  194.863020]  [<ffffffff810851e3>] ctr_crypt+0xb3/0x1f0
[  194.863020]  [<ffffffff8143124e>] ? sg_init_table+0x1e/0x80
[  194.863020]  [<ffffffff813e3b72>] __ablk_encrypt+0x52/0x70
[  194.863020]  [<ffffffff813e3bb4>] ablk_encrypt+0x24/0xa0
[  194.863020]  [<ffffffffa0422314>] crypto_gcm_encrypt+0xc4/0xf0 [gcm]
[  194.863020]  [<ffffffffa04131c2>] cryptodev_cipher_encrypt+0x82/0xf0 
[cryptodev]
[  194.863020]  [<ffffffffa0414c8b>] crypto_auth_run+0x36b/0xf50 [cryptodev]
[  194.863020]  [<ffffffffa041192a>] cryptodev_ioctl+0x26a/0x650 [cryptodev]
[  194.863020]  [<ffffffff813a0555>] ? inode_has_perm.isra.46+0x55/0xa0
[  194.863020]  [<ffffffff8128597e>] do_vfs_ioctl+0x2ee/0x550
[  194.863020]  [<ffffffff813a0c3b>] ? selinux_file_ioctl+0x5b/0xf0
[  194.863020]  [<ffffffff81285c59>] SyS_ioctl+0x79/0x90
[  194.863020]  [<ffffffff818727ae>] entry_SYSCALL_64_fastpath+0x12/0x76
[  194.863020] note: cipher-gcm[3079] exited with preempt_count 1
[  194.863414] cryptodev: cipher-gcm[3079] (cryptodev_release:519): freeing 
item at ffff88003c6c7c00
[  194.863417] cryptodev: cipher-gcm[3079] (cryptodev_release:519): freeing 
item at ffff88003c6c7f00
[  194.863419] cryptodev: cipher-gcm[3079] (cryptodev_release:519): freeing 
item at ffff88003c6c7a80
[  194.863421] cryptodev: cipher-gcm[3079] (cryptodev_release:519): freeing 
item at ffff88003c6c7300
[  194.863424] cryptodev: cipher-gcm[3079] (cryptodev_release:519): freeing 
item at ffff88003c6c7480
[  194.863426] cryptodev: cipher-gcm[3079] (cryptodev_release:519): freeing 
item at ffff8800203b3e40
[  194.863428] cryptodev: cipher-gcm[3079] (cryptodev_release:519): freeing 
item at ffff8800203b3180
[  194.863430] cryptodev: cipher-gcm[3079] (cryptodev_release:519): freeing 
item at ffff8800203b33c0
[  194.863432] cryptodev: cipher-gcm[3079] (cryptodev_release:519): freeing 
item at ffff8800203b39c0
[  194.863435] cryptodev: cipher-gcm[3079] (cryptodev_release:519): freeing 
item at ffff8800203b3840
[  194.863437] cryptodev: cipher-gcm[3079] (cryptodev_release:519): freeing 
item at ffff8800203b3300
[  194.863439] cryptodev: cipher-gcm[3079] (cryptodev_release:519): freeing 
item at ffff8800203b3000
[  194.863442] cryptodev: cipher-gcm[3079] (cryptodev_release:519): freeing 
item at ffff8800203b3600
[  194.863444] cryptodev: cipher-gcm[3079] (cryptodev_release:519): freeing 
item at ffff8800203b36c0
[  194.863446] cryptodev: cipher-gcm[3079] (cryptodev_release:519): freeing 
item at ffff8800203b3cc0
[  194.863448] cryptodev: cipher-gcm[3079] (cryptodev_release:519): freeing 
item at ffff8800203b3b40
[  194.863459] cryptodev: cipher-gcm[3079] (crypto_destroy_session:338): 
Waiting for semaphore of sid=0x7A696D08
[  194.863462] BUG: scheduling while atomic: cipher-gcm/3079/0x00000002
[  194.863463] INFO: lockdep is turned off.
[  194.863464] Modules linked in: gcm cryptodev(OE) ip6t_rpfilter ip6t_REJECT 
nf_reject_ipv6 xt_conntrack ebtable_filter ebtable_broute bridge stp llc 
ebtable_nat ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 
ip6table_raw ip6table_mangle ip6table_security ip6table_filter ip6_tables 
iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack 
iptable_raw iptable_mangle iptable_security snd_hda_codec_generic ppdev 
snd_hda_intel iosf_mbi crct10dif_pclmul snd_hda_codec crc32_pclmul crc32c_intel 
9pnet_virtio ghash_clmulni_intel snd_hda_core snd_hwdep 9pnet snd_seq 
snd_seq_device joydev virtio_balloon snd_pcm parport_pc parport pvpanic 
snd_timer snd acpi_cpufreq i2c_piix4 soundcore nfsd auth_rpcgss nfs_acl lockd 
grace sunrpc virtio_net virtio_console ata_generic vmwgfx
[  194.863505]  drm_kms_helper ttm drm virtio_pci serio_raw virtio_ring 
pata_acpi virtio
[  194.863512] CPU: 0 PID: 3079 Comm: cipher-gcm Tainted: G      D    OE   
4.2.3-300.fc23.x86_64+debug #1
[  194.863513] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 
1.7.5-20140709_153950- 04/01/2014
[  194.863515]  0000000000000000 000000004a01437a ffff880011dc3448 
ffffffff81868ce6
[  194.863518]  0000000000000000 ffff88003976aa40 ffff880011dc3468 
ffffffff810da50d
[  194.863521]  0000000000000002 ffff88003e3d76c0 ffff880011dc34c8 
ffffffff8186babc
[  194.863524] Call Trace:
[  194.863527]  [<ffffffff81868ce6>] dump_stack+0x4c/0x65
[  194.863530]  [<ffffffff810da50d>] __schedule_bug+0x5d/0x80
[  194.863532]  [<ffffffff8186babc>] __schedule+0x86c/0xa10
[  194.863534]  [<ffffffff810e7daa>] ? sched_clock_cpu+0x8a/0xb0
[  194.863536]  [<ffffffff8186bc9e>] schedule+0x3e/0x90
[  194.863538]  [<ffffffff8186c085>] schedule_preempt_disabled+0x15/0x20
[  194.863540]  [<ffffffff8186ea02>] mutex_lock_nested+0x182/0x3e0
[  194.863543]  [<ffffffffa04106b3>] ? cryptodev_release+0x1b3/0x3e0 [cryptodev]
[  194.863545]  [<ffffffffa04106b3>] ? cryptodev_release+0x1b3/0x3e0 [cryptodev]
[  194.863548]  [<ffffffffa04106b3>] cryptodev_release+0x1b3/0x3e0 [cryptodev]
[  194.863551]  [<ffffffff81272195>] __fput+0xf5/0x200
[  194.863553]  [<ffffffff812722ee>] ____fput+0xe/0x10
[  194.863556]  [<ffffffff810d19bd>] task_work_run+0x8d/0xc0
[  194.863558]  [<ffffffff810afb64>] do_exit+0x354/0xc30
[  194.863560]  [<ffffffff8111f441>] ? kmsg_dump+0x151/0x1a0
[  194.863561]  [<ffffffff8111f324>] ? kmsg_dump+0x34/0x1a0
[  194.863563]  [<ffffffff810205fe>] oops_end+0x9e/0xd0
[  194.863566]  [<ffffffff810711a5>] no_context+0x135/0x390
[  194.863568]  [<ffffffff81071488>] __bad_area_nosemaphore+0x88/0x200
[  194.863570]  [<ffffffff810e7b7b>] ? sched_clock_local+0x1b/0x90
[  194.863573]  [<ffffffff81071613>] bad_area_nosemaphore+0x13/0x20
[  194.863575]  [<ffffffff81071915>] __do_page_fault+0xd5/0x470
[  194.863577]  [<ffffffff81109139>] ? __lock_acquire+0xcb9/0x1d00
[  194.863580]  [<ffffffff81071da2>] trace_do_page_fault+0x72/0x3f0
[  194.863582]  [<ffffffff81003030>] ? trace_hardirqs_off_thunk+0x17/0x19
[  194.863585]  [<ffffffff8106c16e>] do_async_page_fault+0x1e/0xc0
[  194.863587]  [<ffffffff818749f8>] async_page_fault+0x28/0x30
[  194.863589]  [<ffffffff813bffbb>] ? scatterwalk_pagedone.part.8+0x3b/0x60
[  194.863591]  [<ffffffff813bffb8>] ? scatterwalk_pagedone.part.8+0x38/0x60
[  194.863593]  [<ffffffff813c014e>] scatterwalk_copychunks+0x8e/0x180
[  194.863596]  [<ffffffff813c3e07>] blkcipher_walk_next+0x307/0x3f0
[  194.863598]  [<ffffffff813c3976>] blkcipher_walk_done+0x106/0x290
[  194.863600]  [<ffffffff810851e3>] ctr_crypt+0xb3/0x1f0
[  194.863602]  [<ffffffff8143124e>] ? sg_init_table+0x1e/0x80
[  194.863605]  [<ffffffff813e3b72>] __ablk_encrypt+0x52/0x70
[  194.863607]  [<ffffffff813e3bb4>] ablk_encrypt+0x24/0xa0
[  194.863610]  [<ffffffffa0422314>] crypto_gcm_encrypt+0xc4/0xf0 [gcm]
[  194.863613]  [<ffffffffa04131c2>] cryptodev_cipher_encrypt+0x82/0xf0 
[cryptodev]
[  194.863615]  [<ffffffffa0414c8b>] crypto_auth_run+0x36b/0xf50 [cryptodev]
[  194.863618]  [<ffffffffa041192a>] cryptodev_ioctl+0x26a/0x650 [cryptodev]
[  194.863621]  [<ffffffff813a0555>] ? inode_has_perm.isra.46+0x55/0xa0
[  194.863624]  [<ffffffff8128597e>] do_vfs_ioctl+0x2ee/0x550
[  194.863626]  [<ffffffff813a0c3b>] ? selinux_file_ioctl+0x5b/0xf0
[  194.863628]  [<ffffffff81285c59>] SyS_ioctl+0x79/0x90
[  194.863631]  [<ffffffff818727ae>] entry_SYSCALL_64_fastpath+0x12/0x76
_______________________________________________
Cryptodev-linux-devel mailing list
Cryptodev-linux-devel@gna.org
https://mail.gna.org/listinfo/cryptodev-linux-devel

Reply via email to