I'm a kernel newbie, but I've found a bug that looks like it might be
in the crypto api.  Here is what I have been able to discover.  I'd
really like to learn from this so if there is anything I can do to
help find the root cause please let me know.  Of course I would also
like to know what the root cause is as well.

[1.]  One line summary of the problem:  Booting my IBM T20 with
2.6.17-rc5 causes a kernel panic, with and initial message of "BUG:
scheduling while atomic: swapper/0x4e31468b/1"

[2.]  Full description of the problem/report:  My laptop worked fine
with 2.6.16.18, but when I tried 2.6.17-rc5 it would kernel panic on
boot.  I found that the problem occurs when I have both the Whirlpool
digest algorithms, and the Testing module compiled into my kernel.  It
does not occur if these are compiled as modules.

[3.] Keywords (i.e., modules, networking, kernel):
[4.] Kernel version (from /proc/version): 2.6.17-rc5
[5.] Most recent kernel version which did not have the bug:  Doing a
git-bisect I found the first bad commit to be
c1cda48af8b330a23206eceef3bd030b53c979cd:

Author: Andrew Morton <[EMAIL PROTECTED]>
Date:   Sat Mar 25 03:07:15 2006 -0800

  [PATCH] initcall failure reporting

  We presently ignore the return values from initcalls.  But that can carry
  useful debugging information.  So print it out if it's non-zero.

  It turns out the -ENODEV happens quite a lot, due to built-in drivers which
  have no hardware to drive.  So suppress that unless initcall_debug was
  specified.

  Also make the warning message more friendly by printing the name of the
  initcall function.

  Also drop the KERN_DEBUG from the initcall_debug message.  If we specified
  inticall_debug then we obviously want to see the messages.

  Acked-by: Paul Jackson <[EMAIL PROTECTED]>
  Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
  Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>


[6.] Output of oops message:
testing wp256 across pages

testing tgr192
BUG: scheduling while atomic: swapper/0x4e31468b/1
<c0103db1> show_trace+0x21/0x30  <c0103ece> dump_stack+0x1e/0x20
<c0425ae8> schedule+0x4c8/0x620  <c0425cae> wait_for_completion+0x6e/0xa0
<c012d6ae> call_usermodehelper_keys+0x9e/0xb0  <c012d404>
request_module+0xa4/0xf0
<c024035c> crypto_alloc_tfm+0xbc/0xd0  <c0247abf> test_hash+0x8f/0x5f0
<c024a6d4> do_test+0xd34/0x1820  <c05c42ce> init+0x4e/0x90
<c05b0902> do_initcalls+0x82/0x140  <c05b09dc> do_basic_setup+0x1c/0x20
<c01002e7> init+0x37/0x170  <c0101405> kernel_thread_helper+0x5/0x10
=======================
BUG: unable to handle kernel paging request at virtual address b1972030
printing eip:
c0103d3b
*pde = 00000000
Oops: 0000 [#1]
Modules linked in:
CPU:    0
EIP:    0060:[<c0103d3b>]    Not tainted VLI
EFLAGS: 00010246   (2.6.17-rc5 #25)
EIP is at show_trace_log_lvl+0xbb/0x110
eax: b1972000   ebx: 00000000   ecx: 00000000   edx: 00000000
esi: 00000000   edi: 00000000   ebp: cffdcc14   esp: cffdcbfc
ds: 007b   es: 007b   ss: 0068
Process swapper (pid: 1, threadinfo=cffdc000 task=cffdba10)
Stack: c04466d1 c0447739 b1972000 cffdc000 cffdcd40 cffdccb0 cffdcc28 c0103db1
     cffdba10 cffdcc38 c0447739 cffdcc3c c0103ece cffdba10 cffdcc38 cffdcc48
     cffdcc94 c0425ae8 c04499ec cffdbb94 4e31468b 00000001 00000096 00000000
Call Trace:
<c0103e5a> show_stack_log_lvl+0x9a/0xc0  <c010406a> show_registers+0x19a/0x210
<c010426a> die+0xea/0x210  <c0118f20> do_page_fault+0x3c0/0x670
<c0103a7b> error_code+0x4f/0x54  <c0103db1> show_trace+0x21/0x30
<c0103ece> dump_stack+0x1e/0x20  <c0425ae8> schedule+0x4c8/0x620
<c0425cae> wait_for_completion+0x6e/0xa0  <c012d6ae>
call_usermodehelper_keys+0x9e/0xb0
<c012d404> request_module+0xa4/0xf0  <c024035c> crypto_alloc_tfm+0xbc/0xd0
<c0247abf> test_hash+0x8f/0x5f0  <c024a6d4> do_test+0xd34/0x1820
<c05c42ce> init+0x4e/0x90  <c05b0902> do_initcalls+0x82/0x140
<c05b09dc> do_basic_setup+0x1c/0x20  <c01002e7> init+0x37/0x170
<c0101405> kernel_thread_helper+0x5/0x10
=======================
BUG: unable to handle kernel paging request at virtual address b1972030
printing eip:
c0103d3b
*pde = 00000000
Oops: 0000 [#2]
Modules linked in:
CPU:    0
EIP:    0060:[<c0103d3b>]    Not tainted VLI
EFLAGS: 00010046   (2.6.17-rc5 #25)
EIP is at show_trace_log_lvl+0xbb/0x110
eax: b1972000   ebx: 00000000   ecx: 00000000   edx: 00000001
esi: 00000000   edi: 00000000   ebp: cffdcab8   esp: cffdcaa0
ds: 007b   es: 007b   ss: 0068
Process swapper (pid: 1, threadinfo=cffdc000 task=cffdba10)
Stack: c04466d1 c044672c b1972000 cffdcc5c 00000018 c044672c cffdcad8 c0103e5a
     00000000 cffdcbfc c044672c c044672c 00000000 cffdcbc8 cffdcb18 c010406a
     00000000 cffdcbfc c044672c cffdc000 cffdba10 00010246 c0526162 00000003
Call Trace:
<c0103e5a> show_stack_log_lvl+0x9a/0xc0  <c010406a> show_registers+0x19a/0x210
<c010426a> die+0xea/0x210  <c0118f20> do_page_fault+0x3c0/0x670
<c0103a7b> error_code+0x4f/0x54  <c0103e5a> show_stack_log_lvl+0x9a/0xc0
<c010406a> show_registers+0x19a/0x210  <c010426a> die+0xea/0x210
<c0118f20> do_page_fault+0x3c0/0x670  <c0103a7b> error_code+0x4f/0x54
<c0103db1> show_trace+0x21/0x30  <c0103ece> dump_stack+0x1e/0x20
<c0425ae8> schedule+0x4c8/0x620  <c0425cae> wait_for_completion+0x6e/0xa0
<c012d6ae> call_usermodehelper_keys+0x9e/0xb0  <c012d404>
request_module+0xa4/0xf0
<c024035c> crypto_alloc_tfm+0xbc/0xd0  <c0247abf> test_hash+0x8f/0x5f0
<c024a6d4> do_test+0xd34/0x1820  <c05c42ce> init+0x4e/0x90
<c05b0902> do_initcalls+0x82/0x140  <c05b09dc> do_basic_setup+0x1c/0x20
<c01002e7> init+0x37/0x170  <c0101405> kernel_thread_helper+0x5/0x10
=======================
BUG: unable to handle kernel paging request at virtual address b1972030
printing eip:
c0103d3b
*pde = 00000000
Recursive die() failure, output suppressed
<0>Kernel panic - not syncing: Fatal exception in interrupt


[7.] A small shell script or example program which triggers the
problem (if possible):  The problem only occurs when I reboot the
machine.  It does not occur if I build the Testing module as a module
and then load it.

[8.] Environment
[8.1.] Software (add the output of the ver_linux script here):
Linux tux 2.6.16.18 #1 Thu May 25 12:11:34 CDT 2006 i686 Pentium III
(Coppermine) GNU/Linux

Gnu C                  3.4.6
Gnu make               3.81
binutils               2.16.1
util-linux             2.12r
mount                  2.12r
module-init-tools      3.2.2
e2fsprogs              1.38
reiserfsprogs          3.6.19
reiser4progs           line
pcmcia-cs              3.2.9
Linux C Library        > libc.2.4
Dynamic linker (ldd)   2.4
Procps                 3.2.6
Net-tools              1.60
Kbd                    1.12
Sh-utils               5.95
udev                   090
Modules Loaded         orinoco_cs orinoco hermes savage snd_seq_midi
snd_pcm_oss snd_mixer_oss snd_seq_oss snd_seq_midi_event snd_seq
snd_cs46xx snd_rawmidi snd_seq_device snd_ac97_codec snd_ac97_bus
snd_pcm snd_timer snd snd_page_alloc

[8.2.] Processor information (from /proc/cpuinfo):
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 8
model name      : Pentium III (Coppermine)
stepping        : 3
cpu MHz         : 700.000
cache size      : 256 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca
cmov pat pse36 mmx fxsr sse
bogomips        : 747.26

[8.3.] Module information (from /proc/modules):
orinoco_cs 14596 1 - Live 0xd097a000
orinoco 39316 1 orinoco_cs, Live 0xd130e000
hermes 6784 2 orinoco_cs,orinoco, Live 0xd126a000
savage 33536 1 - Live 0xd1260000
snd_seq_midi 6816 0 - Live 0xd087d000
snd_pcm_oss 49440 0 - Live 0xd1270000
snd_mixer_oss 17408 2 snd_pcm_oss, Live 0xd096d000
snd_seq_oss 31744 0 - Live 0xd0943000
snd_seq_midi_event 5888 2 snd_seq_midi,snd_seq_oss, Live 0xd0901000
snd_seq 47824 5 snd_seq_midi,snd_seq_oss,snd_seq_midi_event, Live 0xd1253000
snd_cs46xx 78436 1 - Live 0xd092e000
snd_rawmidi 20128 2 snd_seq_midi,snd_cs46xx, Live 0xd0877000
snd_seq_device 7052 4 snd_seq_midi,snd_seq_oss,snd_seq,snd_rawmidi,
Live 0xd0857000
snd_ac97_codec 94368 1 snd_cs46xx, Live 0xd094d000
snd_ac97_bus 1920 1 snd_ac97_codec, Live 0xd084d000
snd_pcm 79368 3 snd_pcm_oss,snd_cs46xx,snd_ac97_codec, Live 0xd0919000
snd_timer 20996 2 snd_seq,snd_pcm, Live 0xd085b000
snd 46180 10 
snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_cs46xx,snd_rawmidi,snd_seq_device,snd_ac97_codec,snd_pcm,snd_timer,
Live 0xd0862000
snd_page_alloc 8712 2 snd_cs46xx,snd_pcm, Live 0xd084f000

[8.4.] Loaded driver and hardware information (/proc/ioports, /proc/iomem)
[8.5.] PCI information ('lspci -vvv' as root)
[8.6.] SCSI information (from /proc/scsi/scsi)
[8.7.] Other information that might be relevant to the problem
     (please look in /proc and include all information that you
     think to be relevant):
[X.] Other notes, patches, fixes, workarounds:  Disabling the Testing
module, or the Whirlpool digest algorithms, or compiling them as
modules makes the problem go-away.  Also The problem did not appear
until after the patch in [5.].
-
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to