Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Aug 2005 13:50:10 -0400
From:      Mike Tancsa <mike@sentex.net>
To:        Pawel Jakub Dawidek <pjd@freebsd.org>, FreeBSD-current <freebsd-current@freebsd.org>
Subject:   Re: VIA/ACE PadLock integration with crypto(9).
Message-ID:  <6.2.3.4.0.20050812130608.07aaf5f8@64.7.153.2>
In-Reply-To: <20050812134511.GE25162@garage.freebsd.pl>
References:  <20050812134511.GE25162@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
At 09:45 AM 12/08/2005, Pawel Jakub Dawidek wrote:
>Hi.
>
>This is a call for testers.
>I integrated VIA/ACE PadLock with our crypto(9) subsystem, so now it can
>be used with things like fast_ipsec(4) and geli(8).

Havent got to the FAST_IPSEC tests yet (will=20
soon) but against CURRENT from this morning,

I get a lot of

Aug 12 13:07:47 via-releng5 kernel: GEOM_ELI:=20
g_eli_crypto_run() failed (error=3D12).=20
ad0s1e.eli[WRITE(offset=3D470958080, length=3D131072)]
Aug 12 13:07:47 via-releng5 kernel: GEOM_ELI:=20
g_eli_crypto_run() failed (error=3D12).=20
ad0s1e.eli[WRITE(offset=3D471089152, length=3D131072)]
Aug 12 13:07:47 via-releng5 kernel: GEOM_ELI:=20
g_eli_crypto_run() failed (error=3D12).=20
ad0s1e.eli[WRITE(offset=3D471220224, length=3D131072)]
Aug 12 13:07:47 via-releng5 kernel: GEOM_ELI:=20
g_eli_crypto_run() failed (error=3D12).=20
ad0s1e.eli[WRITE(offset=3D471351296, length=3D131072)]
Aug 12 13:07:47 via-releng5 kernel: GEOM_ELI:=20
g_eli_crypto_run() failed (error=3D12).=20
ad0s1e.eli[WRITE(offset=3D472006656, length=3D131072)]
Aug 12 13:07:47 via-releng5 kernel: GEOM_ELI:=20
g_eli_crypto_run() failed (error=3D12).=20
ad0s1e.eli[WRITE(offset=3D472137728, length=3D131072)]
Aug 12 13:07:47 via-releng5 kernel: GEOM_ELI:=20
g_eli_crypto_run() failed (error=3D12).=20
ad0s1e.eli[WRITE(offset=3D472268800, length=3D131072)]
Aug 12 13:07:47 via-releng5 kernel: GEOM_ELI:=20
g_eli_crypto_run() failed (error=3D12).=20
ad0s1e.eli[WRITE(offset=3D472399872, length=3D131072)]
Aug 12 13:07:47 via-releng5 kernel: GEOM_ELI:=20
g_eli_crypto_run() failed (error=3D12).=20
ad0s1e.eli[WRITE(offset=3D472530944, length=3D131072)]
Aug 12 13:07:48 via-releng5 kernel: GEOM_ELI:=20
g_eli_crypto_run() failed (error=3D12).=20
ad0s1e.eli[WRITE(offset=3D472530944, length=3D131072)]

with and without the padlock loaded.  This is just running
bonnie -s 500 -d /cryptedmnt against a normal=20
ufs2 partition, and against the same partition=20
with aes.  I was about to do the test with the=20
padlock.ko loaded, but it cannot complete the test.


               -------Sequential Output--------=20
---Sequential Input-- --Random--
               -Per Char- --Block--- -Rewrite--=20
-Per Char- --Block--- --Seeks---
Machine    MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU  /sec=
 %CPU
70-raw    512 23589 94.5 30965 29.7 10836 12.3 16836 79.7 32200 26.3 189.7 =
 2.1
7-s-crypt 500  5856 24.2  7014  7.6  1296  1.5  5923 28.6  6712  6.1 155.9 =
 1.7

I detach and then load the kld, and attach the drive again

Aug 12 13:17:11 via-releng5 kernel: GEOM_ELI: Device ad0s1e.eli destroyed.
Aug 12 13:28:38 via-releng5 kernel: GEOM_ELI: Device ad0s1e.eli created.
Aug 12 13:28:38 via-releng5 kernel: GEOM_ELI:     Cipher: AES
Aug 12 13:28:38 via-releng5 kernel: GEOM_ELI: Key length: 128
Aug 12 13:28:38 via-releng5 kernel: GEOM_ELI:     Crypto: hardware
Aug 12 13:29:53 via-releng5 kernel: GEOM_ELI:=20
g_eli_crypto_run() failed (error=3D12).=20
ad0s1e.eli[WRITE(offset=3D106971136, length=3D131072
)]
Aug 12 13:29:53 via-releng5 kernel: GEOM_ELI:=20
g_eli_crypto_run() failed (error=3D12).=20
ad0s1e.eli[WRITE(offset=3D107757568, length=3D131072
)]
Aug 12 13:29:54 via-releng5 kernel: GEOM_ELI:=20
g_eli_crypto_run() failed (error=3D12).=20
ad0s1e.eli[WRITE(offset=3D107757568, length=3D131072
)]
Aug 12 13:29:54 via-releng5 kernel: GEOM_ELI:=20
g_eli_crypto_run() failed (error=3D12).=20
ad0s1e.eli[WRITE(offset=3D108937216, length=3D131072
)]
Aug 12 13:29:54 via-releng5 kernel: GEOM_ELI:=20
g_eli_crypto_run() failed (error=3D12).=20
ad0s1e.eli[WRITE(offset=3D109592576, length=3D131072
)]
Aug 12 13:29:54 via-releng5 kernel: GEOM_ELI:=20
g_eli_crypto_run() failed (error=3D12).=20
ad0s1e.eli[WRITE(offset=3D109592576, length=3D131072
)]
Aug 12 13:29:55 via-releng5 kernel: GEOM_ELI:=20
g_eli_crypto_run() failed (error=3D12).=20
ad0s1e.eli[WRITE(offset=3D110641152, length=3D131072
)]

And then start up bonnie once more.  Its blasting=20
along quite well (speed at least twice as fast)  and then crash.


[via-releng5]# bonnie -s 500 -d /mnt
File '/mnt/Bonnie.680', size: 524288000
Writing with putc()...done
Rewriting...



[via-releng5]# GEOM_ELI: Device ad0s1e.eli created.
GEOM_ELI:     Cipher: AES
GEOM_ELI: Key length: 128
GEOM_ELI:     Crypto: software
GEOM_ELI: Device ad0s1e.eli destroyed.
GEOM_ELI: Device ad0s1e.eli created.
GEOM_ELI:     Cipher: AES
GEOM_ELI: Key length: 128
GEOM_ELI:     Crypto: hardware

[via-releng5]# GEOM_ELI: g_eli_crypto_run()=20
failed (error=3D12). ad0s1e.eli[WRITE(offset=3D6045696, length=3D131072)]
GEOM_ELI: g_eli_crypto_run() failed (error=3D12).=20
ad0s1e.eli[WRITE(offset=3D7094272, length=3D131072)]
GEOM_ELI: g_eli_crypto_run() failed (error=3D12).=20
ad0s1e.eli[WRITE(offset=3D8011776, length=3D131072)]


Fatal trap 12: page fault while in kernel mode
fault virtual address   =3D 0xc1ad8004
fault code              =3D supervisor write, page not present
instruction pointer     =3D 0x20:0xc061909c
stack pointer           =3D 0x28:0xcb788cf4
frame pointer           =3D 0x28:0xcb788d10
code segment            =3D base 0x0, limit 0xfffff, type 0x1b
                         =3D DPL 0, pres 1, def32 1, gran 1
processor eflags        =3D interrupt enabled, resume, IOPL =3D 0
current process         =3D 6 (crypto returns)
trap number             =3D 12
panic: page fault
Uptime: 3m5s
Dumping 239 MB (2 chunks)
   chunk 0: 1MB (160 pages) ... ok
   chunk 1: 239MB (61168 pages) 223 207 191 175=20
159 143 127 111 95 79 63 47 31 15 ... ok

Dump complete




(kgdb) bt
#0  doadump () at pcpu.h:165
#1  0xc053a90d in boot (howto=3D260) at=
 /usr/src/sys/kern/kern_shutdown.c:397
#2  0xc053aba0 in panic (fmt=3D0xc06e93bf "%s") at=20
/usr/src/sys/kern/kern_shutdown.c:553
#3  0xc06a9ba4 in trap_fatal (frame=3D0xcb788cb4,=20
eva=3D3249401860) at /usr/src/sys/i386/i386/trap.c:841
#4  0xc06a990f in trap_pfault (frame=3D0xcb788cb4,=20
usermode=3D0, eva=3D3249401860) at /usr/src/sys/i386/i386/trap.c:752
#5  0xc06a9555 in trap (frame=3D
       {tf_fs =3D 8, tf_es =3D 40, tf_ds =3D 40, tf_edi=20
=3D 0, tf_esi =3D -1045699744, tf_ebp =3D -881292016,=20
tf_isp =3D -881292064, tf_ebx =3D -1051817936, tf_edx=20
=3D -1045565440, tf_ecx =3D -1066090464, tf_eax =3D=20
-1066009788, tf_trapno =3D 12, tf_err =3D 2, tf_eip =3D=20
-1067347812, tf_cs =3D 32, tf_eflags =3D 66182,=20
tf_esp =3D 0, tf_ss =3D 0}) at /usr/src/sys/i386/i386/trap.c:442
#6  0xc0698e0a in calltrap () at /usr/src/sys/i386/i386/exception.s:139
#7  0x00000008 in ?? ()
#8  0x00000028 in ?? ()
#9  0x00000028 in ?? ()
#10 0x00000000 in ?? ()
#11 0xc1abe360 in ?? ()
#12 0xcb788d10 in ?? ()
#13 0xcb788ce0 in ?? ()
#14 0xc14e8830 in ?? ()
#15 0xc1adf000 in ?? ()
#16 0xc074c020 in g_wither_work ()
#17 0xc075fb44 in crypto_q_mtx ()
#18 0x0000000c in ?? ()
#19 0x00000002 in ?? ()
#20 0xc061909c in crypto_ret_proc () at=
 /usr/src/sys/opencrypto/crypto.c:1202
#21 0xc0525ad8 in fork_exit (callout=3D0xc061904c=20
<crypto_ret_proc>, arg=3D0x0, frame=3D0xcb788d38) at=20
/usr/src/sys/kern/kern_fork.c:789
#22 0xc0698e6c in fork_trampoline () at=
 /usr/src/sys/i386/i386/exception.s:208



This is on

Copyright (c) 1992-2005 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
         The Regents of the University of California. All rights reserved.
FreeBSD 7.0-CURRENT #1: Fri Aug 12 12:07:13 EDT 2005
     mdtancsa@via-releng5.sentex.ca:/usr/obj/usr/src/sys/pioneer
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: VIA C3 Nehemiah+RNG+ACE (1199.79-MHz 686-class CPU)
   Orig




# kgdb /usr/obj/usr/src/sys/pioneer/kernel.debug vmcore.2
[GDB will not be able to debug user-mode threads:=20
/usr/lib/libthread_db.so: Undefined symbol "ps_pglobal_lookup"]
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain=
 conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd".

Unread portion of the kernel message buffer:
GEOM_ELI: g_eli_crypto_run() failed (error=3D12).=20
ad0s1e.eli[WRITE(offset=3D8011776, length=3D131072)]


Fatal trap 12: page fault while in kernel mode
fault virtual address   =3D 0xc1ad8004
fault code              =3D supervisor write, page not present
instruction pointer     =3D 0x20:0xc061909c
stack pointer           =3D 0x28:0xcb788cf4
frame pointer           =3D 0x28:0xcb788d10
code segment            =3D base 0x0, limit 0xfffff, type 0x1b
                         =3D DPL 0, pres 1, def32 1, gran 1
processor eflags        =3D interrupt enabled, resume, IOPL =3D 0
current process         =3D 6 (crypto returns)
trap number             =3D 12
panic: page fault
Uptime: 3m5s
Dumping 239 MB (2 chunks)
   chunk 0: 1MB (160 pages) ... ok
   chunk 1: 239MB (61168 pages) 223 207 191 175=20
159 143 127 111 95 79 63 47 31 15

#0  doadump () at pcpu.h:165
165     pcpu.h: No such file or directory.
         in pcpu.h
(kgdb) bt
#0  doadump () at pcpu.h:165
#1  0xc053a90d in boot (howto=3D260) at=
 /usr/src/sys/kern/kern_shutdown.c:397
#2  0xc053aba0 in panic (fmt=3D0xc06e93bf "%s") at=20
/usr/src/sys/kern/kern_shutdown.c:553
#3  0xc06a9ba4 in trap_fatal (frame=3D0xcb788cb4,=20
eva=3D3249373188) at /usr/src/sys/i386/i386/trap.c:841
#4  0xc06a990f in trap_pfault (frame=3D0xcb788cb4,=20
usermode=3D0, eva=3D3249373188) at /usr/src/sys/i386/i386/trap.c:752
#5  0xc06a9555 in trap (frame=3D
       {tf_fs =3D 8, tf_es =3D 40, tf_ds =3D 40, tf_edi=20
=3D 0, tf_esi =3D -1045728416, tf_ebp =3D -881292016,=20
tf_isp =3D -881292064, tf_ebx =3D -1051817936, tf_edx=20
=3D -1045594112, tf_ecx =3D -1066090464, tf_eax =3D=20
-1066009788, tf_trapno =3D 12, tf_err =3D 2, tf_eip =3D=20
-1067347812, tf_cs =3D 32, tf_eflags =3D 66182,=20
tf_esp =3D 0, tf_ss =3D 0}) at /usr/src/sys/i386/i386/trap.c:442
#6  0xc0698e0a in calltrap () at /usr/src/sys/i386/i386/exception.s:139
#7  0x00000008 in ?? ()
#8  0x00000028 in ?? ()
#9  0x00000028 in ?? ()
#10 0x00000000 in ?? ()
#11 0xc1ab7360 in ?? ()
#12 0xcb788d10 in ?? ()
#13 0xcb788ce0 in ?? ()
#14 0xc14e8830 in ?? ()
#15 0xc1ad8000 in ?? ()
#16 0xc074c020 in g_wither_work ()
#17 0xc075fb44 in crypto_q_mtx ()
#18 0x0000000c in ?? ()
#19 0x00000002 in ?? ()
#20 0xc061909c in crypto_ret_proc () at=
 /usr/src/sys/opencrypto/crypto.c:1202
#21 0xc0525ad8 in fork_exit (callout=3D0xc061904c=20
<crypto_ret_proc>, arg=3D0x0, frame=3D0xcb788d38) at=20
/usr/src/sys/kern/kern_fork.c:789
#22 0xc0698e6c in fork_trampoline () at=
 /usr/src/sys/i386/i386/exception.s:208
(kgdb) bt full
#0  doadump () at pcpu.h:165
No locals.
#1  0xc053a90d in boot (howto=3D260) at=
 /usr/src/sys/kern/kern_shutdown.c:397
         first_buf_printf =3D 1
#2  0xc053aba0 in panic (fmt=3D0xc06e93bf "%s") at=20
/usr/src/sys/kern/kern_shutdown.c:553
         td =3D (struct thread *) 0xc14c3780
         bootopt =3D 260
         newpanic =3D 0
         ap =3D 0xc14c3780 "0\210N=C1@HL=C1"
         buf =3D "page fault", '\0' <repeats 245 times>
#3  0xc06a9ba4 in trap_fatal (frame=3D0xcb788cb4,=20
eva=3D3249373188) at /usr/src/sys/i386/i386/trap.c:841
         code =3D 40
         type =3D 12
         ss =3D 40
         esp =3D 0
         softseg =3D {ssd_base =3D 0, ssd_limit =3D=20
1048575, ssd_type =3D 27, ssd_dpl =3D 0, ssd_p =3D 1, ssd_xx =3D 8, ssd_xx1=
 =3D 0,
   ssd_def32 =3D 1, ssd_gran =3D 1}
#4  0xc06a990f in trap_pfault (frame=3D0xcb788cb4,=20
usermode=3D0, eva=3D3249373188) at /usr/src/sys/i386/i386/trap.c:752
         va =3D 3249373184
         vm =3D (struct vmspace *) 0x0
         map =3D 0xc1043000
         rv =3D 1
         ftype =3D 1 '\001'
         td =3D (struct thread *) 0xc14c3780
         p =3D (struct proc *) 0xc14e8830
#5  0xc06a9555 in trap (frame=3D
       {tf_fs =3D 8, tf_es =3D 40, tf_ds =3D 40, tf_edi=20
=3D 0, tf_esi =3D -1045728416, tf_ebp =3D -881292016,=20
tf_isp =3D -881292064, tf_ebx =3D -1051817936, tf_edx=20
=3D -1045594112, tf_ecx =3D -1066090464, tf_eax =3D=20
-1066009788, tf_trapno =3D 12, tf_err =3D 2, tf_eip =3D=20
-1067347812, tf_cs =3D 32, tf_eflags =3D 66182,=20
tf_esp =3D 0, tf_ss =3D 0}) at /usr/src/sys/i386/i386/trap.c:442
         td =3D (struct thread *) 0xc14c3780
         p =3D (struct proc *) 0xc14e8830
         sticks =3D 3226734063
         i =3D 0
         ucode =3D 0
         type =3D 12
         code =3D 2
         eva =3D 3249373188
#6  0xc0698e0a in calltrap () at /usr/src/sys/i386/i386/exception.s:139
No locals.
#7  0x00000008 in ?? ()
No symbol table info available.
#8  0x00000028 in ?? ()
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#9  0x00000028 in ?? ()
No symbol table info available.
#10 0x00000000 in ?? ()
No symbol table info available.
#11 0xc1ab7360 in ?? ()
No symbol table info available.
#12 0xcb788d10 in ?? ()
No symbol table info available.
#13 0xcb788ce0 in ?? ()
No symbol table info available.
#14 0xc14e8830 in ?? ()
No symbol table info available.
#15 0xc1ad8000 in ?? ()
No symbol table info available.
#16 0xc074c020 in g_wither_work ()
No symbol table info available.
#17 0xc075fb44 in crypto_q_mtx ()
No symbol table info available.
#18 0x0000000c in ?? ()
No symbol table info available.
#19 0x00000002 in ?? ()
No symbol table info available.
#20 0xc061909c in crypto_ret_proc () at=
 /usr/src/sys/opencrypto/crypto.c:1202
         crpt =3D (struct cryptop *) 0xc1ab7360
         krpt =3D (struct cryptkop *) 0x0
#21 0xc0525ad8 in fork_exit (callout=3D0xc061904c=20
<crypto_ret_proc>, arg=3D0x0, frame=3D0xcb788d38) at=20
/usr/src/sys/kern/kern_fork.c:789
         p =3D (struct proc *) 0xc14e8830
         td =3D (struct thread *) 0x0
#22 0xc0698e6c in fork_trampoline () at=
 /usr/src/sys/i386/i386/exception.s:208
No locals.
(kgdb)









Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6.2.3.4.0.20050812130608.07aaf5f8>