Re: [PATCH] x86/crypto: ghash: use C implementation for setkey()

2014-03-27 Thread H. Peter Anvin
On 03/27/2014 04:46 AM, Ard Biesheuvel wrote: > On 27 March 2014 12:36, Herbert Xu wrote: >> On Thu, Mar 27, 2014 at 12:29:00PM +0100, Ard Biesheuvel wrote: >>> The GHASH setkey() function uses SSE registers but fails to call >>> kernel_fpu_begin()/kernel_fpu_end(). Instead of adding these calls,

Re: [PATCH] x86/crypto: ghash: use C implementation for setkey()

2014-03-27 Thread Ard Biesheuvel
On 27 March 2014 12:46, Ard Biesheuvel wrote: > On 27 March 2014 12:36, Herbert Xu wrote: >> On Thu, Mar 27, 2014 at 12:29:00PM +0100, Ard Biesheuvel wrote: >>> The GHASH setkey() function uses SSE registers but fails to call >>> kernel_fpu_begin()/kernel_fpu_end(). Instead of adding these calls,

Re: [PATCH] x86/crypto: ghash: use C implementation for setkey()

2014-03-27 Thread Ard Biesheuvel
On 27 March 2014 12:36, Herbert Xu wrote: > On Thu, Mar 27, 2014 at 12:29:00PM +0100, Ard Biesheuvel wrote: >> The GHASH setkey() function uses SSE registers but fails to call >> kernel_fpu_begin()/kernel_fpu_end(). Instead of adding these calls, and >> then having to deal with the restriction tha

Re: [PATCH] x86/crypto: ghash: use C implementation for setkey()

2014-03-27 Thread Herbert Xu
On Thu, Mar 27, 2014 at 12:29:00PM +0100, Ard Biesheuvel wrote: > The GHASH setkey() function uses SSE registers but fails to call > kernel_fpu_begin()/kernel_fpu_end(). Instead of adding these calls, and > then having to deal with the restriction that they cannot be called from > interrupt context

[PATCH] x86/crypto: ghash: use C implementation for setkey()

2014-03-27 Thread Ard Biesheuvel
The GHASH setkey() function uses SSE registers but fails to call kernel_fpu_begin()/kernel_fpu_end(). Instead of adding these calls, and then having to deal with the restriction that they cannot be called from interrupt context, move the setkey() implementation to the C domain. Note that setkey()