Subject: Re: IPSEC still fails on BETA2/vax (not anymore!)
To: Anders Magnusson <ragge@ludd.luth.se>
From: Olaf Seibert <rhialto@polderland.nl>
List: current-users
Date: 07/13/2002 00:07:50
On Fri 12 Jul 2002 at 23:48:02 +0200, Olaf Seibert wrote:
> This seems to fix the problem for me. So unless there are hidden
> assumptions in the code that ISTACK_SIZE is just NBPG, I would propose
> this change to go into -current and pulled up to the 1.6 branch.

Darn, that was a bit too soon. I guess I should also increase the normal
kernel stack somehow. Are those numbers in the stack traceback the stack
pointer? In that case, SHA1Update (or SHA1Transform?) uses an idiotic
amount of stack (which I would not suspect if I read
src/sys/lib/libkern/sha1.c).. It must be misleading in this case.
Oh well, another job for tomorrow :)

64 bytes from 10.0.0.5: icmp_seq=35 ttl=255 time=50.000 ms
64 bytes from 10.0.0.5: icmp_seq=36 ttl=255 time=50.001 ms
64 bytes from 10.0.0.5: icmp_seq=37 ttl=255 time=50.001 ms
64 bytes from 10.0.0.5: icmp_seq=38 ttl=255 time=50.001 ms
^C
----azenomei.falu.nl PING Statistics----
39 packets transmitted, 39 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 50.000/50.514/59.999/2.234 ms
bash-2.04# mount /vol1
panic: kernel stack invalid
Stopped in pid 140 (mount_nfs) at       trap+0x174:     tstl    64(r8)
db> tr
panic: kernel stack invalid
Stack traceback :
0x80337b34: trap+0x174(0x80337bb4)
0x80337bb4: trap type=0xf code=0x0 pc=0x8012b14b psl=0xcc0008
0x80337b80: SHA1Transform+0x673(0x8aad1564,0x8aad1580)
0x8aad14e0: SHA1Update+0x66(0x8aad1564,0x80190464,0x200)
0x8aad1518: rndpool_extract_data+0x5a(0x8019043c,0x885b3b00,0x8,0)
0x8aad15c0: rnd_extract_data+0x23(0x885b3b00,0x8,0)
0x8aad1600: key_randomfill+0x1a(0x885b3b00,0x8)
0x8aad162c: key_sa_stir_iv+0x25(0x8866f880)
0x8aad1658: esp_cbc_encrypt+0x457(0x80dbc800,0x14,0x88,0x8866f880,0x801649ac,0x8
)
0x8aad16b8: esp_output+0x60b(0x80dbc800,0x80dbc8f5,0x8132e800,0x8867c400,0x2)
0x8aad1730: esp4_output+0x42(0x80dbc800,0x8867c400)
0x8aad1774: ipsec4_output+0x289(0x8aad1920,0x88691000,0)
0x8aad18a0: ip_output+0x59c(0x8132e800,0,0x80ed9ce0,0,0)
0x8aad1944: udp_output+0x19a(0x81370200,0x80ed9cc0)
0x8aad1988: udp_usrreq+0x1ca(0x8121a00c,0x9,0x81370200,0x805d4400,0,0x814b41c8)
0x8aad19c0: sosend+0x4b2(0x8121a00c,0x805d4400,0,0x81370200,0,0)
0x8aad1a24: nfs_send+0x87(0x8121a00c,0x805d4400,0x81370200,0x8868fbc0)
0x8aad1a6c: nfs_request+0x2a6(0x814789a4,0x805d4e00,0x1,0x814b41c8,0x8866f900,0x
8aad1b4c,0x8aad1b50,0x8aad1b54)
0x8aad1af8: nfs_getattr+0x2ef(0x8aad1b90)
0x8aad1b60: VOP_GETATTR+0x3f(0x814789a4,0x81616000,0x8866f900,0x814b41c8)
0x8aad1ba4: nfs_nget+0x20c(0x88699400,0x8aad1cd0,0x1c,0x8aad1c10)
0x8aad1bd0: mountnfs+0x18e(0x8aad1dc8,0x88699400,0x805d4400,0x8aad1d6c,0x8aad1d1
0,0x8aad1cc4,0x814b41c8)
0x8aad1c78: nfs_mount+0x135(0x88699400,0x7ffffc89,0x7ffffaac,0x8aad1e58,0x814b41
c8)
0x8aad1e10: sys_mount+0x2dc(0x814b41c8,0x8aad1f60,0x8aad1f58)
0x8aad1f14: syscall+0x140(0x8aad1fb4)
db> show registers
r0                   0
r1                 0xf
r2                   0
r3          0x801882b4  splsave+0x44
r4                   0
r5                   0
r6                 0xf
r7          0x814b41c8  end+0x13124a0
r8          0x80337bb4  end+0x195e8c
r9                   0
r10                  0
r11                  0
ap          0x80337bac  end+0x195e84
fp          0x80337b80  end+0x195e58
sp          0x80337b34  end+0x195e0c
pc          0x80121f6c  trap+0x174
psl          0x41f0000
trap+0x174:     tstl    64(r8)
db> 

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert - rhialto@       -- Woe betide the one who feels
\X/ polderland.nl  -- remorse without sin - Tom Poes, "Het boze oog", 4444.