Subject: Re: openssl and opencrypto
To: None <current-users@netbsd.org>
From: Jeff Ito <jeff@delnoch.net>
List: current-users
Date: 12/31/2005 16:05:47
On Thu, Dec 29, 2005 at 12:23:19PM -0500, Jeff wrote:
> It appears that since the recent openssl import, hardware crypto via
> openssl is broken.
>
> [...]
The OpenSSL problem appears to be fixed by a few recent commits from
christos, bin/32414 can probably be closed, however see below.
> That said, it doesnt seem to be "just working" transparently, as the
> speed tests show ~identical results on the machine w/ and w/o the hifn
> card.
>
The tests with and w/o the hifn card are still ~identical on
indentical hardware.
hifn0 at pci0 dev 14 function 0: Hifn 7955, rev. 0
hifn0: 3DES/AES, 32KB dram, interrupting at irq 11
The only possible clue I've found so far that may lend some hints are:
$ ktrace openssl speed -engine cryptodev aes
[...]
982 1 openssl NAMI "/dev/crypto"
982 1 openssl RET open 3
982 1 openssl CALL fcntl(3,2,1)
982 1 openssl RET fcntl 0
982 1 openssl CALL ioctl(3,CRIOGET,0xbfbfe3f0)
982 1 openssl GIO fd 3 wrote 4 bytes
"\0\M-a \b"
982 1 openssl GIO fd 3 read 4 bytes
"\^D\0\0\0"
982 1 openssl RET ioctl 0
982 1 openssl CALL fcntl(4,2,1)
982 1 openssl RET fcntl 0
982 1 openssl CALL ioctl(4,CIOCASYMFEAT,0xbbbae9c0)
982 1 openssl GIO fd 4 read 4 bytes
"\0\0\0\0"
[...]
982 1 openssl CALL ioctl(3,CRIOGET,0xbfbfe350)
982 1 openssl GIO fd 3 wrote 4 bytes
"\0\0\0\0"
982 1 openssl GIO fd 3 read 4 bytes
"\^D\0\0\0"
982 1 openssl RET ioctl 0
982 1 openssl CALL fcntl(4,2,1)
982 1 openssl RET fcntl 0
982 1 openssl CALL ioctl(4,CIOCGSESSION,0xbfbfe370)
982 1 openssl GIO fd 4 wrote 28 bytes
"\^A\0\0\0\0\0\0\0\b\0\0\0\\\M-9\M-7\M-;\0\0\0\0\0\0\0\0\0\0\0\0"
982 1 openssl RET ioctl -1 errno 22 Invalid argument
982 1 openssl CALL ioctl(4,CIOCGSESSION,0xbfbfe370)
982 1 openssl GIO fd 4 wrote 28 bytes
"\^B\0\0\0\0\0\0\0\^X\0\0\0\\\M-9\M-7\M-;\0\0\0\0\0\0\0\0\0\0\0\0"
982 1 openssl RET ioctl -1 errno 22 Invalid argument