2006-08-20 16:09:31

by Adrian Bunk

[permalink] [raw]
Subject: [-mm patch] CRYPTO_DEV_PADLOCK_AES must select CRYPTO_BLKCIPHER

On Sat, Aug 19, 2006 at 10:00:08PM -0700, Andrew Morton wrote:
>...
> Changes since 2.6.18-rc4-mm1:
>...
> git-cryptodev.patch
>
> git trees
>...

This patch fixes the following compile error:

<-- snip -->

LD .tmp_vmlinux1
drivers/built-in.o: In function `cbc_aes_decrypt':
padlock-aes.c:(.text+0x6c63a): undefined reference to `blkcipher_walk_virt'
padlock-aes.c:(.text+0x6c66f): undefined reference to `blkcipher_walk_done'
drivers/built-in.o: In function `ecb_aes_decrypt':
padlock-aes.c:(.text+0x6c6af): undefined reference to `blkcipher_walk_virt'
padlock-aes.c:(.text+0x6c6de): undefined reference to `blkcipher_walk_done'
drivers/built-in.o: In function `ecb_aes_encrypt':
padlock-aes.c:(.text+0x6c768): undefined reference to `blkcipher_walk_virt'
padlock-aes.c:(.text+0x6c794): undefined reference to `blkcipher_walk_done'
drivers/built-in.o: In function `cbc_aes_encrypt':
padlock-aes.c:(.text+0x6c7d5): undefined reference to `blkcipher_walk_virt'
padlock-aes.c:(.text+0x6c821): undefined reference to `blkcipher_walk_done'
drivers/built-in.o:(.data+0xcfa8): undefined reference to `crypto_blkcipher_type'
drivers/built-in.o:(.data+0xd088): undefined reference to `crypto_blkcipher_type'
make[1]: *** [.tmp_vmlinux1] Error 1

<-- snip -->

Signed-off-by: Adrian Bunk <[email protected]>

---

BTW: The Kconfig+Makefile parts for padlock-sha seem to be missing.

--- linux-2.6.18-rc4-mm2/drivers/crypto/Kconfig.old 2006-08-20 17:28:46.000000000 +0200
+++ linux-2.6.18-rc4-mm2/drivers/crypto/Kconfig 2006-08-20 17:44:56.000000000 +0200
@@ -16,6 +16,7 @@
config CRYPTO_DEV_PADLOCK_AES
bool "Support for AES in VIA PadLock"
depends on CRYPTO_DEV_PADLOCK
+ select CRYPTO_BLKCIPHER
default y
help
Use VIA PadLock for AES algorithm.



2006-08-20 23:04:44

by Herbert Xu

[permalink] [raw]
Subject: Re: [-mm patch] CRYPTO_DEV_PADLOCK_AES must select CRYPTO_BLKCIPHER

On Sun, Aug 20, 2006 at 06:09:28PM +0200, Adrian Bunk wrote:
>
> BTW: The Kconfig+Makefile parts for padlock-sha seem to be missing.

Thanks Adrian.

> --- linux-2.6.18-rc4-mm2/drivers/crypto/Kconfig.old 2006-08-20 17:28:46.000000000 +0200
> +++ linux-2.6.18-rc4-mm2/drivers/crypto/Kconfig 2006-08-20 17:44:56.000000000 +0200
> @@ -16,6 +16,7 @@
> config CRYPTO_DEV_PADLOCK_AES
> bool "Support for AES in VIA PadLock"
> depends on CRYPTO_DEV_PADLOCK
> + select CRYPTO_BLKCIPHER
> default y
> help
> Use VIA PadLock for AES algorithm.

Andrew, there is definitely something screwed up. If you look at
my tree this patch is already in the top changeset that was
supposedly picked up by yout pull:

GIT aabffae140135096195f6fb04d165bb204517db2 git+ssh://master.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git

commit aabffae140135096195f6fb04d165bb204517db2
Author: Herbert Xu <[email protected]>
Date: Tue Aug 15 22:49:54 2006 +1000

[CRYPTO] Kconfig: Added missing selects on BLKCIPHER

Since padlock-aes and aes-s390/des-s390 now use the block cipher interface,
they need to select the BLKCIPHER Kconfig option.

Signed-off-by: Herbert Xu <[email protected]>

Indeed, the s390 bits are there. However, the padlock bits have
gong missing. Perhaps there was a problem when it was merged with
the geode tree? This could explain why the Makefile bits for padlock
went missing too.

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

2006-08-20 23:55:12

by Andrew Morton

[permalink] [raw]
Subject: Re: [-mm patch] CRYPTO_DEV_PADLOCK_AES must select CRYPTO_BLKCIPHER

On Mon, 21 Aug 2006 09:04:15 +1000
Herbert Xu <[email protected]> wrote:

> > --- linux-2.6.18-rc4-mm2/drivers/crypto/Kconfig.old 2006-08-20 17:28:46.000000000 +0200
> > +++ linux-2.6.18-rc4-mm2/drivers/crypto/Kconfig 2006-08-20 17:44:56.000000000 +0200
> > @@ -16,6 +16,7 @@
> > config CRYPTO_DEV_PADLOCK_AES
> > bool "Support for AES in VIA PadLock"
> > depends on CRYPTO_DEV_PADLOCK
> > + select CRYPTO_BLKCIPHER
> > default y
> > help
> > Use VIA PadLock for AES algorithm.
>
> Andrew, there is definitely something screwed up.

Things are a bit messy at present - some git trees are based off Greg's
tree and some are based off Linus's and git is pretty hopeless at pulling
usable diffs in these complex situations.

So yes, it's quite possible that the above is a merging problem.