2007-12-02 15:59:53

by Tan Swee Heng

[permalink] [raw]
Subject: Problems encountered with latest cryptodev-2.6 under UML

Hi all, in the past week I've been having problems with the latest
cryptodev-2.6 tree under UML. One was resolved; but 2 wasn't.

PROBLEM ONE: Compilation
When compiling, I get

In file included from include2/asm/rwsem.h:4,
from /var/tmp/uml/cryptodev-2.6/include/linux/rwsem.h:24,
... <snipped> ...
include/asm/arch/rwsem.h:165: error: 'struct cpuinfo_um' has no
member named 'x86'

I wasn't alone, as this post showed:
<http://www.mail-archive.com/[email protected]/msg233332.html>.
Thankfully that post mentioned the patch at
<http://lkml.org/lkml/2007/11/19/220> which resolved it.

PROBLEM TWO: setkey()
After compilation I was able to run UML. But "modprobe tcrypt mode=3"
gave the following error:

... snipped...
testing cbc(des) encryption
test 1 (64 bit key):
setkey() failed flags=200000

testing cbc(des) decryption
test 1 (64 bit key):
setkey() failed flags=200000


PROBLEM THREE: Unable to remove chainiv
Once loaded, chainiv could not be removed. For example:

[[email protected] ~]# lsmod
Module Size Used by
cbc 3392 0
des_generic 16480 0
ecb 2496 0
chainiv 2232 3
crypto_blkcipher 8516 3 cbc,ecb,chainiv
cryptomgr 2688 0
crypto_algapi 11936 6
cbc,des_generic,ecb,chainiv,crypto_blkcipher,cryptomgr
binfmt_misc 7816 1
[[email protected] ~]# modprobe -r cbc des ecb
[[email protected] ~]# lsmod
Module Size Used by
chainiv 2232 4
crypto_blkcipher 8516 1 chainiv
cryptomgr 2688 0
crypto_algapi 11936 3 chainiv,crypto_blkcipher,cryptomgr
binfmt_misc 7816 1
[[email protected] ~]# modprobe -r chainiv
FATAL: Module chainiv is in use.

Notice that the chainiv "Used by" field seems to be wrong.


Anyone else facing the same problems? I've resorted to rolling back to
19f4711b.... in the meantime but obviously this is not a long-term
solution. Would be glad if someone can point me in the right
directions to resolve these problems.

Swee Heng


2007-12-02 21:28:46

by Herbert Xu

[permalink] [raw]
Subject: Re: Problems encountered with latest cryptodev-2.6 under UML

On Sun, Dec 02, 2007 at 11:59:51PM +0800, Tan Swee Heng wrote:
>
> ... snipped...
> testing cbc(des) encryption
> test 1 (64 bit key):
> setkey() failed flags=200000
>
> testing cbc(des) decryption
> test 1 (64 bit key):
> setkey() failed flags=200000

Yes as I said earlier geniv was broken. I've since removed it from my
tree. I have a fixed version here which I'll post as soon as I've fixed
gcm to use it.

Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

2007-12-05 16:59:28

by Tan Swee Heng

[permalink] [raw]
Subject: Re: Problems encountered with latest cryptodev-2.6 under UML

Hi Herbert,

On Dec 3, 2007 5:28 AM, Herbert Xu <[email protected]> wrote:
> Yes as I said earlier geniv was broken. I've since removed it from my
> tree.
Sorry for the lousy bug report. I misinterpreted git-pull's "Already
up-to-date" to mean that it matches your tree exactly. Apparently that
is not the case. I just git-clone and the current tree works fine.
Thanks!

Swee Heng

2007-12-05 23:42:32

by Herbert Xu

[permalink] [raw]
Subject: Re: Problems encountered with latest cryptodev-2.6 under UML

On Thu, Dec 06, 2007 at 12:59:27AM +0800, Tan Swee Heng wrote:
> Sorry for the lousy bug report. I misinterpreted git-pull's "Already
> up-to-date" to mean that it matches your tree exactly. Apparently that
> is not the case. I just git-clone and the current tree works fine.

Sorry, I had rebased my tree so you'd need to rewind your local
version before it would match. I should've made an announcement :)

Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt