Greetings!

I'm attempting to use cryptodev-linux (v1.6) on a PPC32 CPU (MPC8315E,
which has a SEC v3.3), under Linux 3.4.36.

Driving it through OpenSSL (v1.0.1e), I get this error when I try to
do a detached signature:

[   27.903370] cryptodev: unap-main[179] (adjust_sg_array:93):
reallocating from 32 to 8192 pages
[   27.923485] talitos e0030000.crypto: length exceeds h/w max limit
[   27.929705] cryptodev: unap-main[179] (hash_n_crypt:98): CryptoAPI
failure: -22

I can see where that error is originating from, but I can't figure out
which layer should be responsible for splitting the work up into
manageable chunks.

I can run the same code, compiled natively on x86-64, and it works
fine.  So it seems to be in interaction between cryptodev and talitos
in particular.

Let me know if I can provide more information, or if you'd like me to
open an issue on github, or anything else I can do to help solve this.
 I've attached some sample output at the bottom of this message.

(Also, please keep me cc'd, as I'm not subscribed to the list.)

Many thanks in advance for any hints.

Best regards,
Anthony Foiani

---------------------------------------------------------------------------------------------
Here's some sample output (from the openssl app itself, not from my code):

# uname -a
Linux csbx6315 3.4.36-ajf-g7b768b3 #1 Wed Apr 24 16:06:02 MDT 2013 ppc GNU/Linux

# cat /proc/cpuinfo
processor       : 0
cpu             : e300c3
clock           : 266.666664MHz
revision        : 2.0 (pvr 8085 0020)
bogomips        : 66.66
timebase        : 33333333
platform        : MPC831x RDB
Memory          : 256 MB

# openssl engine cryptodev -t -c
WARNING: can't open config file: //ssl/openssl.cnf
(cryptodev) BSD cryptodev engine
 [RSA, DSA, DH, DES-CBC, DES-EDE3-CBC, AES-128-CBC, AES-192-CBC,
AES-256-CBC, BF-CBC, hmacWithMD5, hmacWithSHA1, MD5, SHA1]
     [ available ]

# openssl speed -elapsed -engine cryptodev -evp AES-128-CBC
WARNING: can't open config file: //ssl/openssl.cnf
engine "cryptodev" set.
You have chosen to measure elapsed time instead of user CPU time.
Doing aes-128-cbc for 3s on 16 size blocks: 21646 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 64 size blocks: 22104 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 256 size blocks: 21389 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 1024 size blocks: 18737 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 8192 size blocks: 11621 aes-128-cbc's in 3.00s
OpenSSL 1.0.1e 11 Feb 2013
built on: Wed Apr 24 19:46:53 MDT 2013
options:bn(64,32) rc4(ptr,char) des(idx,risc1,16,long) aes(partial)
blowfish(idx)
compiler: powerpc-e300c3-linux-gnu-gcc -fPIC -DOPENSSL_PIC -DZLIB
-DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H
-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DB_ENDIAN -DTERMIO -O3 -Wall
-DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DAES_ASM
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
aes-128-cbc        115.45k      471.55k     1825.19k     6395.56k    31733.08k

# openssl speed -elapsed -engine cryptodev -evp SHA1
WARNING: can't open config file: //ssl/openssl.cnf
engine "cryptodev" set.
You have chosen to measure elapsed time instead of user CPU time.
Doing sha1 for 3s on 16 size blocks: 6696 sha1's in 3.00s
Doing sha1 for 3s on 64 size blocks: 6727 sha1's in 3.00s
Doing sha1 for 3s on 256 size blocks: 5406 sha1's in 3.00s
Doing sha1 for 3s on 1024 size blocks: 5278 sha1's in 3.00s
Doing sha1 for 3s on 8192 size blocks: 4434 sha1's in 3.00s
OpenSSL 1.0.1e 11 Feb 2013
built on: Wed Apr 24 19:46:53 MDT 2013
options:bn(64,32) rc4(ptr,char) des(idx,risc1,16,long) aes(partial)
blowfish(idx)
compiler: powerpc-e300c3-linux-gnu-gcc -fPIC -DOPENSSL_PIC -DZLIB
-DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H
-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DB_ENDIAN -DTERMIO -O3 -Wall
-DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DAES_ASM
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
sha1                35.71k      143.51k      461.31k     1801.56k    12107.78k

#

_______________________________________________
Cryptodev-linux-devel mailing list
Cryptodev-linux-devel@gna.org
https://mail.gna.org/listinfo/cryptodev-linux-devel

Reply via email to