[Ocf-linux-users] [Fwd: Re: OCF-linux and 2.6.27.x]
Brought to you by:
david-m
|
From: Jonathan F. <jon...@wi...> - 2009-03-06 15:24:36
|
Forgot to CC list sorry. -------- Forwarded Message -------- > From: Jonathan Fournier <jon...@wi...> > To: dav...@se... > Subject: Re: OCF-linux and 2.6.27.x > Date: Thu, 05 Mar 2009 14:39:59 -0500 > > I suspect things that might be going wrong here, I don't know if it's > related to 2.6.27 or something. > > I'm using a Freescale 8548 (talitos.ko with debug enabled) > > % cryptotest -v 100 4096 > crid = 3000000 > cipher 3des keylen 24 > CIOCGSESSION: Invalid argument > root@sbc8548:/root> Jan 1 02:38:06 sbc8548 kernel: cryptodev_open() > Jan 1 02:38:06 sbc8548 kernel: cryptodev_ioctl(cmd=c0046364 arg=b8faf438) > Jan 1 02:38:06 sbc8548 kernel: cryptodev_ioctl(CRIOGET) > Jan 1 02:38:06 sbc8548 kernel: cryptodev_ioctl(cmd=c030636a arg=b8faf43c) > Jan 1 02:38:06 sbc8548 kernel: cryptodev_ioctl(CIOCGSESSION2) > Jan 1 02:38:06 sbc8548 kernel: cryptodev_ioctl(CIOCGSESSION2) - no mac > Jan 1 02:38:06 sbc8548 kernel: /home/jfournie/sandbox/build-3.0/wrs_sbc8548/build/linux/crypto/ocf/crypto.c,370: DRIVER_LOCK() > Jan 1 02:38:06 sbc8548 kernel: /home/jfournie/sandbox/build-3.0/wrs_sbc8548/build/linux/crypto/ocf/crypto.c,406: DRIVER_UNLOCK() > Jan 1 02:38:06 sbc8548 kernel: cryptodev_ioctl(CIOCGSESSION2) - newsession 22 > Jan 1 02:38:06 sbc8548 kernel: cryptodev_ioctl(CIOCGSESSION2) - bail 22 > Jan 1 02:38:06 sbc8548 kernel: cryptodev_release() > > The crypto-tools seems to fail with CIOCGSESSION: Invalid argument. > > % openssl engine -c > (cryptodev) BSD cryptodev engine > [RSA, DSA, DH] > (dynamic) Dynamic engine loading support > root@sbc8548:/root> Jan 1 02:43:21 sbc8548 kernel: cryptodev_open() > Jan 1 02:43:21 sbc8548 kernel: cryptodev_ioctl(cmd=c0046364 arg=bccc5828) > Jan 1 02:43:21 sbc8548 kernel: cryptodev_ioctl(CRIOGET) > Jan 1 02:43:21 sbc8548 kernel: cryptodev_ioctl(cmd=40046369 arg=f77c910) > Jan 1 02:43:21 sbc8548 kernel: cryptodev_ioctl(CIOCASYMFEAT) > Jan 1 02:43:21 sbc8548 kernel: /home/jfournie/sandbox/build-3.0/wrs_sbc8548/build/linux/crypto/ocf/crypto.c,1221: DRIVER_LOCK() > Jan 1 02:43:21 sbc8548 kernel: /home/jfournie/sandbox/build-3.0/wrs_sbc8548/build/linux/crypto/ocf/crypto.c,1233: DRIVER_UNLOCK() > Jan 1 02:43:21 sbc8548 kernel: cryptodev_ioctl(cmd=c0046364 arg=bccc5758) > Jan 1 02:43:21 sbc8548 kernel: cryptodev_ioctl(CRIOGET) > Jan 1 02:43:21 sbc8548 kernel: cryptodev_ioctl(cmd=c01c6365 arg=bccc5780) > Jan 1 02:43:21 sbc8548 kernel: cryptodev_ioctl(CIOCGSESSION) > Jan 1 02:43:21 sbc8548 kernel: cryptodev_ioctl(CIOCGSESSION) - no mac > Jan 1 02:43:21 sbc8548 kernel: /home/jfournie/sandbox/build-3.0/wrs_sbc8548/build/linux/crypto/ocf/crypto.c,370: DRIVER_LOCK() > Jan 1 02:43:21 sbc8548 kernel: /home/jfournie/sandbox/build-3.0/wrs_sbc8548/build/linux/crypto/ocf/crypto.c,406: DRIVER_UNLOCK() > Jan 1 02:43:21 sbc8548 kernel: cryptodev_ioctl(CIOCGSESSION) - newsession 22 > Jan 1 02:43:21 sbc8548 kernel: cryptodev_ioctl(CIOCGSESSION) - bail 22 > ... repeated 5 times > Jan 1 02:43:21 sbc8548 kernel: cryptodev_ioctl(cmd=c0046364 arg=bccc5758) > Jan 1 02:43:21 sbc8548 kernel: cryptodev_ioctl(CRIOGET) > Jan 1 02:43:21 sbc8548 kernel: cryptodev_ioctl(cmd=c01c6365 arg=bccc5780) > Jan 1 02:43:21 sbc8548 kernel: cryptodev_ioctl(CIOCGSESSION) > Jan 1 02:43:21 sbc8548 kernel: cryptodev_ioctl(CIOCGSESSION) - no cipher > Jan 1 02:43:21 sbc8548 kernel: /home/jfournie/sandbox/build-3.0/wrs_sbc8548/build/linux/crypto/ocf/crypto.c,370: DRIVER_LOCK() > Jan 1 02:43:21 sbc8548 kernel: /home/jfournie/sandbox/build-3.0/wrs_sbc8548/build/linux/crypto/ocf/crypto.c,406: DRIVER_UNLOCK() > Jan 1 02:43:21 sbc8548 kernel: cryptodev_ioctl(CIOCGSESSION) - newsession 22 > Jan 1 02:43:21 sbc8548 kernel: cryptodev_ioctl(CIOCGSESSION) - bail 22 > ... repeated 4 times > > Then it does repeat the whole "no mac", "no cipher" a second time and then exit with: > > Jan 1 02:43:21 sbc8548 kernel: cryptodev_release() > > I don't get any kernel crashing error or something, but with openssl > having BSD cryptodev engine present or not doesn't change anything, I > always get the same "openssl speed -engine cryptodev dsa -elapsed" > benchmark results in both cases. > > Do you have any idea? > > Cheers, > > /jonathan > > On Thu, 2009-03-05 at 13:09 -0500, Jonathan Fournier wrote: > > Hi David, > > > > I recently tried OCF-linux and Linux 2.6.27.18 and got minor compile > > errors. > > > > I saw that the OpenWrt folks had this fix to overcome kill_proc to use > > send_sig: > > > > https://dev.openwrt.org/browser/trunk/target/linux/generic-2.6/patches-2.6.27/973-ocf_2.6.27_fix.patch?rev=13341 > > > > And that files_fdtable usage now requires: > > > > diff --git a/crypto/ocf/cryptodev.c b/crypto/ocf/cryptodev.c > > index 13d57a1..5110447 100644 > > --- a/crypto/ocf/cryptodev.c > > +++ b/crypto/ocf/cryptodev.c > > @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.34 2007/05/09 19:37:02 gn > > #include <linux/mount.h> > > #include <linux/miscdevice.h> > > #include <linux/version.h> > > +#include <linux/fdtable.h> > > #include <asm/uaccess.h> > > > > #include <cryptodev.h> > > > > > > Is the "experimental" fix for kill_proc make sens to you to include in > > newer OCF-linux release? > > > > I also have other questings regarding the TODO list: > > > > * What are the preemption problems under 2.6? I'm interested in helping > > fixing them if it still applies. > > > > * About the Full IPSEC payload processing, do you mean integration with > > the native Linux IPSEC stack, or continue with OpenSWAN KLIPS? Which one > > is preferable? > > > > * What is your general feeling about the other initiative with Linux > > CryptoAPI? I saw some threads from this Spring/Summer, that another > > similar cryptodev-like interface is being created? > > > > From: > > http://marc.info/?l=openssl-users&m=121941527119483&w=2 > > http://www.mail-archive.com/lin...@vg.../msg01908.html > > http://www.mail-archive.com/lin...@vg.../msg02172.html > > http://www.mail-archive.com/lin...@vg.../msg02234.html > > > > Cheers, > > > > -- > > Jonathan Fournier, Senior Engineer, Wind River > > direct +1.613.270.5786 mobile +1.613.263.9223 fax +1.613.592.2283 > > 350 Terry Fox Drive, Suite 200, Ottawa, Ontario, K2K 2W5, Canada |