Hi Herbert, We have reworked the assembly to use macros instead of the new aesni instructions. Do you think it is possible to get it in into 2.6.37? Thanks, Tadeusz From 0ea40c3b63af3c4c3573cf5247ce855f06b45a9c Mon Sep 17 00:00:00 2001 From: Tadeusz Struk <tadeusz.struk@intel.com> Date: Thu, 28 Oct 2010 15:01:58 +0100 Subject: [PATCH 2/3] RFC4106 AES-GCM Driver Using Intel New Instructions This patch adds an optimized RFC4106 AES-GCM implementation for 64-bit kernels. It supports 128-bit AES key size. This leverages the crypto AEAD interface type to facilitate a combined AES & GCM operation to be implemented in assembly code. The assembly code leverages Intel(R) AES New Instructions and the PCLMULQDQ instruction. Signed-off-by: Adrian Hoban <adrian.hoban@intel.com> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Gabriele Paoloni <gabriele.paoloni@intel.com> Signed-off-by: Aidan O'Mahony <aidan.o.mahony@intel.com> Signed-off-by: Erdinc Ozturk <erdinc.ozturk@intel.com> Signed-off-by: James Guilford <james.guilford@intel.com> Signed-off-by: Wajdi Feghali <wajdi.k.feghali@intel.com> --- arch/x86/crypto/aesni-intel_asm.S | 1192 ++++++++++++++++++++++++++++++++++++ arch/x86/crypto/aesni-intel_glue.c | 518 ++++++++++++++++- 2 files changed, 1708 insertions(+), 2 deletions(-) diff --git a/arch/x86/crypto/aesni-intel_asm.S b/arch/x86/crypto/aesni-intel_asm.S index ff16756..aafced5 100644 --- a/arch/x86/crypto/aesni-intel_asm.S +++ b/arch/x86/crypto/aesni-intel_asm.S @@ -9,6 +9,17 @@ * Vinodh Gopal <vinodh.gopal@intel.com> * Kahraman Akdemir * + * Added RFC4106 AES-GCM support for 128-bit keys under the AEAD + * interface for 64-bit kernels. + * Authors: Erdinc Ozturk (erdinc.ozturk@intel.com) + * Aidan O'Mahony (aidan.o.mahony@intel.com) + * Adrian Hoban <adrian.hoban@intel.com> + * James Guilford (james.guilford@intel.com) + * Gabriele Paoloni ...
Sorry, it needed to have been ready much earlier to make this merge window. Cheers, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --
On Thu, 4 Nov 2010 14:04:05 -0500 Whatever's in today's linux-next is a big fail with gas-2.16.1. Which was entirely predictable! How often has this happened recently?? arch/x86/crypto/aesni-intel_asm.S: Assembler messages: arch/x86/crypto/aesni-intel_asm.S:834: Error: no such instruction: `pshufb SHUF_MASK(%rip),%xmm13' arch/x86/crypto/aesni-intel_asm.S:866: Error: no such instruction: `pshufb SHUF_MASK(%rip),%xmm5' arch/x86/crypto/aesni-intel_asm.S:866: Error: no such instruction: `pshufb SHUF_MASK(%rip),%xmm0' arch/x86/crypto/aesni-intel_asm.S:866: Error: bad expression arch/x86/crypto/aesni-intel_asm.S:866: Error: junk at end of line, first unrecognized character is `0' arch/x86/crypto/aesni-intel_asm.S:866: Error: no such instruction: `pshufb SHUF_MASK(%rip),%xmm6' arch/x86/crypto/aesni-intel_asm.S:866: Error: no such instruction: `pshufb SHUF_MASK(%rip),%xmm7' arch/x86/crypto/aesni-intel_asm.S:866: Error: no such instruction: `pshufb SHUF_MASK(%rip),%xmm8' arch/x86/crypto/aesni-intel_asm.S:866: Error: non-constant expression in ".if" statement arch/x86/crypto/aesni-intel_asm.S:866: Error: no such instruction: `pshufb SHUF_MASK(%rip),%xmm6' arch/x86/crypto/aesni-intel_asm.S:866: Error: non-constant expression in ".if" statement arch/x86/crypto/aesni-intel_asm.S:866: Error: no such instruction: `pshufb SHUF_MASK(%rip),%xmm7' arch/x86/crypto/aesni-intel_asm.S:866: Error: non-constant expression in ".if" statement arch/x86/crypto/aesni-intel_asm.S:866: Error: no such instruction: `pshufb SHUF_MASK(%rip),%xmm8' arch/x86/crypto/aesni-intel_asm.S:866: Error: no such instruction: `pshufb SHUF_MASK(%rip),%xmm1' arch/x86/crypto/aesni-intel_asm.S:866: Error: no such instruction: `pshufb SHUF_MASK(%rip),%xmm2' arch/x86/crypto/aesni-intel_asm.S:866: Error: no such instruction: `pshufb SHUF_MASK(%rip),%xmm3' arch/x86/crypto/aesni-intel_asm.S:866: Error: no such instruction: `pshufb SHUF_MASK(%rip),%xmm4' arch/x86/crypto/aesni-intel_asm.S:15: Error: non-constant expression in ".if" ...
Sorry, but I no longer have access to a binutils that is older than 2.18 so I never saw this failure. Tadeusz, could you please make an incremental patch that converts all the pshufb instructions to macros? Thanks! -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --
Will do. Tadeusz -----Original Message----- From: Herbert Xu [mailto:herbert@gondor.apana.org.au] Sent: Thursday, November 18, 2010 9:27 AM To: Andrew Morton Cc: Struk, Tadeusz; linux-kernel@vger.kernel.org; linux-crypto@vger.kernel.org; O Mahony, Aidan; Paoloni, Gabriele; Hoban, Adrian Subject: Re: [PATCH 2/3] RFC4106 AES-GCM Driver Using Intel New Instructions Sorry, but I no longer have access to a binutils that is older than 2.18 so I never saw this failure. Tadeusz, could you please make an incremental patch that converts all the pshufb instructions to macros? Thanks! -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
On Thu, 18 Nov 2010 09:38:50 +0000 (top-posting repaired) (busted attribution/quoting repaired) Current mainline still has this failure. --
Tadeusz, can you update us on your progress on this? Andrew, I'll just back this out if it doesn't get resolved. Cheers, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --
Hi Herbert and Andrew, Sorry for delay. We have the patch almost ready. We just want to do some more testing before we send it. We should be ready to send it out next week. Next Friday (10 Dec) will be worst case date. Thanks, Tadeusz -----Original Message----- From: Herbert Xu [mailto:herbert@gondor.apana.org.au] Sent: Friday, December 03, 2010 1:30 AM To: Andrew Morton Cc: Struk, Tadeusz; linux-kernel@vger.kernel.org; linux-crypto@vger.kernel.org; O Mahony, Aidan; Paoloni, Gabriele; Hoban, Adrian Subject: Re: [PATCH 2/3] RFC4106 AES-GCM Driver Using Intel New Instructions Tadeusz, can you update us on your progress on this? Andrew, I'll just back this out if it doesn't get resolved. Cheers, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -------------------------------------------------------------- Intel Shannon Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 Business address: Dromore House, East Park, Shannon, Co. Clare This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. --
Andrew, the problem should be resolved in the current cryptodev tree. Please let me know if it still blows up for you. Thanks, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --
