Re: crypto API and IBM z990 hardware support

From: Christoph Hellwig (
Date: Mon Jul 07 2003 - 02:09:29 EST

On Wed, Jul 02, 2003 at 07:35:16PM +1000, James Morris wrote:
> The plan is to provide crypto/arch/ subdirectories where arch optimized
> versions of the crypto algorithms are implemented, and built automatically
> (via configuration defaults) instead of the generic C versions.
> So, there might be:
> crypto/aes.c
> crypto/arch/i386/aes.s

crypto/arch/ sounds like a bad idea. We really should avoid arch code
outside arch/ and include/asm*. So arch/<foo>/crypto/ as suggested by
Thomas is much better.

> where on i386, aes.s would be built into aes.o and aes.c would not be
> built.

That's a really bad idea. Think of a i586/i686 optimized assembler
implementaion e.g. using MMX or SSE or whatever. You'll always need
the generic version as fallback.

> The simple solution for you might be something like:
> crypto/aes.c -> aes.o
> crypto/arch/s390/aes_z990.c -> aes_z990.o
> and the administrator of the system could configure modprobe.conf to alias
> aes to aes_z990 if the latter is supported in hardware.

Right. And IMHO this should happen with all optimized version - putting
policy in the kernel to select them sounds like a bad idea, especially
as it could get rather complicated when it involves multiple optimized
and / or hardware implementations.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Jul 07 2003 - 22:00:28 EST