Bug 14617 - Kernel Ooops with Via Padlock Engine
Summary: Kernel Ooops with Via Padlock Engine
Status: RESOLVED CODE_FIX
Alias: None
Product: Other
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Herbert Xu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-16 20:29 UTC by Nico Erfurth
Modified: 2009-11-23 12:10 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.31.6
Subsystem:
Regression: No
Bisected commit-id:


Attachments
aes_encrypt function from padload-aes.o (2.79 KB, text/plain)
2009-11-16 22:47 UTC, Nico Erfurth
Details
crypto: padlock-aes - Use the correct mask when checking whether copying is required (1.45 KB, patch)
2009-11-17 01:13 UTC, Herbert Xu
Details | Diff

Description Nico Erfurth 2009-11-16 20:29:53 UTC
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
Comment 1 Andrew Morton 2009-11-16 21:02:06 UTC
Assigned to Herbert.

We don't seem to have a crypto category in bugzilla.
Comment 2 Alexey Dobriyan 2009-11-16 22:33:50 UTC
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.
Comment 3 Nico Erfurth 2009-11-16 22:47:53 UTC
Created attachment 23806 [details]
aes_encrypt function from padload-aes.o

aes_encrypt function from padload-aes.o
Comment 4 Nico Erfurth 2009-11-16 22:49:53 UTC
(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.
Comment 5 Herbert Xu 2009-11-17 01:13:36 UTC
Created attachment 23807 [details]
crypto: padlock-aes - Use the correct mask when checking whether copying is required

Does this patch help?
Comment 6 Nico Erfurth 2009-11-17 05:55:51 UTC
(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
Comment 7 Herbert Xu 2009-11-23 12:10:03 UTC
Patch has now been sent to stable.  Thanks!

Note You need to log in before you can comment on or make changes to this bug.