I'm running an encrypted raid5 system on a Via Nano Board. The used cipher is: aes-xts-plain:sha256 As soon as I'm writing to the device, it Oopses after some data was written. It happens every time. Thats not something I would trust my data with currently ;) [ 368.000144] BUG: unable to handle kernel paging request at fffb7000 [ 368.000303] IP: [<f81fd1b9>] aes_encrypt+0x85/0xa8 [padlock_aes] [ 368.000408] *pde = 01491067 *pte = 00000000 [ 368.000539] Oops: 0000 [#1] [ 368.000633] last sysfs file: /sys/kernel/uevent_seqnum [ 368.000694] Modules linked in: xts gf128mul padlock_sha padlock_aes raid456 raid6_pq dm_crypt async_xor async_memcpy async_tx xor i2c_viapro pcspkr [ 368.001000] Pid: 6621, comm: kcryptd Tainted: G W (2.6.31.6 #7) VX800 [ 368.001000] EIP: 0060:[<f81fd1b9>] EFLAGS: 00010283 CPU: 0 [ 368.001000] EIP is at aes_encrypt+0x85/0xa8 [padlock_aes] [ 368.001000] EAX: 00000080 EBX: f57c6030 ECX: 00000001 EDX: f57c6210 [ 368.001000] ESI: fffb6f90 EDI: fffb6f90 EBP: f579fe54 ESP: f579fe40 [ 368.001000] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 [ 368.001000] Process kcryptd (pid: 6621, ti=f579e000 task=f7376a80 task.ti=f579e000) [ 368.001000] Stack: [ 368.001000] f57c6210 00000001 fffb6f90 f736eb10 f4d92f90 f579fe80 f823622a f54eddb0 [ 368.001000] <0> f579fe90 f579fee0 f57c6000 00000070 00000010 f54edd80 f54eddb0 f736ea80 [ 368.001000] <0> f579fed4 f82362f6 f81fd134 f81fd134 c1b9a240 f4d92e00 c1bf4b00 fffb6e00 [ 368.001000] Call Trace: [ 368.001000] [<f823622a>] ? crypt+0x91/0xe0 [xts] [ 368.001000] [<f82362f6>] ? encrypt+0x3b/0x42 [xts] [ 368.001000] [<f81fd134>] ? aes_encrypt+0x0/0xa8 [padlock_aes] [ 368.001000] [<f81fd134>] ? aes_encrypt+0x0/0xa8 [padlock_aes] [ 368.001000] [<c1119ef1>] ? async_encrypt+0x31/0x38 [ 368.001000] [<f809faaf>] ? crypt_convert+0x1d1/0x24b [dm_crypt] [ 368.001000] [<f809feab>] ? kcryptd_crypt+0x382/0x3a3 [dm_crypt] [ 368.001000] [<c10282d0>] ? worker_thread+0x11c/0x18e [ 368.001000] [<f809fb29>] ? kcryptd_crypt+0x0/0x3a3 [dm_crypt] [ 368.001000] [<c102aa71>] ? autoremove_wake_function+0x0/0x33 [ 368.001000] [<c10281b4>] ? worker_thread+0x0/0x18e [ 368.001000] [<c102a744>] ? kthread+0x6b/0x70 [ 368.001000] [<c102a6d9>] ? kthread+0x0/0x70 [ 368.001000] [<c1003033>] ? kernel_thread_helper+0x7/0x10 [ 368.001000] Code: 00 00 c1 e0 04 01 c2 81 fa 00 10 00 00 76 14 6a 01 89 d9 ff 75 ec 89 fa 89 f0 e8 53 fe ff ff 59 5b eb 0c b9 01 00 00 00 8b 55 ec <f3> 0f a7 c8 83 7d f0 00 74 09 0f 20 c0 83 c8 08 0f 22 c0 8b 45 [ 368.001000] EIP: [<f81fd1b9>] aes_encrypt+0x85/0xa8 [padlock_aes] SS:ESP 0068:f579fe40 [ 368.001000] CR2: 00000000fffb7000 [ 368.001000] ---[ end trace 4eaa2a86a8e2da24 ]--- [ 368.001000] note: kcryptd[6621] exited with preempt_count 2
Assigned to Herbert. We don't seem to have a crypto category in bugzilla.
Do objdump -dr drivers/crypto/padlock-aes.o and attach aes_encrypt() disassembly (as text/plain ;-). Or rebuild with CONFIG_DEBUG_INFO=y and CONFIG_CRYPTO_DEV_PADLOCK_AES=y, and after new oops happens, do addr2line -e vmlinux $EIP where EIP is EIP from new oops, so we know where kernel oopses.
Created attachment 23806 [details] aes_encrypt function from padload-aes.o aes_encrypt function from padload-aes.o
(In reply to comment #2) > Do > > objdump -dr drivers/crypto/padlock-aes.o > > and attach aes_encrypt() disassembly (as text/plain ;-). Done! > Or rebuild with CONFIG_DEBUG_INFO=y and CONFIG_CRYPTO_DEV_PADLOCK_AES=y, > and after new oops happens, do > > addr2line -e vmlinux $EIP > > where EIP is EIP from new oops, so we know where kernel oopses. Can't do this right now. I'll see if I can run tests on the machine later.
Created attachment 23807 [details] crypto: padlock-aes - Use the correct mask when checking whether copying is required Does this patch help?
(In reply to comment #5) > Created an attachment (id=23807) [details] > crypto: padlock-aes - Use the correct mask when checking whether copying is > required > > Does this patch help? Thanks Herbert, this patch solved the problem. This should go into 2.6.31.7 Nico
Patch has now been sent to stable. Thanks!