[PATCH] dcp: aes: Move the AES operation type from actx to rctx

2014-01-14 Thread Marek Vasut
Move the AES operation type and mode from async crypto context to crypto request context. This allows for recycling of the async crypto context for different kinds of operations. I found this problem when I used dm-crypt, which uses the same async crypto context (actx) for both encryption and

[PATCH 2/3] crypto: Pull out the functions to save/restore request

2014-01-14 Thread Marek Vasut
The functions to save original request within a newly adjusted request and it's counterpart to restore the original request can be re-used by more code in the crypto/ahash.c file. Pull these functions out from the code so they're available. Signed-off-by: Marek Vasut ma...@denx.de Cc: David S.

[PATCH 3/3] crypto: Simplify the ahash_finup implementation

2014-01-14 Thread Marek Vasut
The ahash_def_finup() can make use of the request save/restore functions, thus make it so. This simplifies the code a little and unifies the code paths. Note that the same remark about free()ing the req-priv applies here, the req-priv can only be free()'d after the original request was restored.

[PATCH 1/3] crypto: Fix the pointer voodoo in unaligned ahash

2014-01-14 Thread Marek Vasut
Add documentation for the pointer voodoo that is happening in crypto/ahash.c in ahash_op_unaligned(). This code is quite confusing, so add a beefy chunk of documentation. Moreover, make sure the mangled request is completely restored after finishing this unaligned operation. This means restoring

[PATCH 0/3] crypto: Clean up ahash handling confusion

2014-01-14 Thread Marek Vasut
This set of patches shall clean up the confusion in restoring the ahash request context in crypto/ahash.c . The code was a bit refactored to make it easier to understand as well. Please, make sure the code is well tested before applying. Also, please review very thoroughly. Marek Vasut (3):

Re: [PATCH 1/3] crypto: Fix the pointer voodoo in unaligned ahash

2014-01-14 Thread Tom Lendacky
On Tuesday, January 14, 2014 06:33:47 PM Marek Vasut wrote: Add documentation for the pointer voodoo that is happening in crypto/ahash.c in ahash_op_unaligned(). This code is quite confusing, so add a beefy chunk of documentation. Moreover, make sure the mangled request is completely

Re: [PATCH -next] crypto: mxs - Fix sparse non static symbol warning

2014-01-14 Thread Herbert Xu
On Thu, Jan 09, 2014 at 03:43:01PM +0100, Marek Vasut wrote: On Wednesday, January 08, 2014 at 02:48:56 PM, Wei Yongjun wrote: From: Wei Yongjun yongjun_...@trendmicro.com.cn Fixes the following sparse warning: drivers/crypto/mxs-dcp.c:103:1: warning: symbol 'global_mutex' was not

Re: [PATCH 0/6] crypto: ccp - more code fixes/cleanup

2014-01-14 Thread Herbert Xu
On Mon, Jan 06, 2014 at 01:33:53PM -0600, Tom Lendacky wrote: The following series implements a fix to hash length wrapping as well as some additional fixes and cleanups (proper gfp_t type on some memory allocations, scatterlist usage improvements, null request result field checks and driver

Re: [PATCH v1] crypto: aesni - fix build on x86 (32bit)

2014-01-14 Thread Herbert Xu
On Thu, Jan 09, 2014 at 08:57:42AM -0800, Tim Chen wrote: From 41656afcbd63ccb92357d4937a75629499f4fd4f Mon Sep 17 00:00:00 2001 From: Tim Chen tim.c.c...@linux.intel.com Date: Mon, 6 Jan 2014 07:23:52 -0800 Subject: [PATCH] crypto: Rename aesni-intel_avx.S to indicate it only supports

Re: [PATCH 7/8 v3] crypto:s5p-sss: validate iv before memcpy

2014-01-14 Thread Naveen Krishna Ch
Hello Tomasz, On 10 January 2014 21:33, Tomasz Figa t.f...@samsung.com wrote: Hi Naveen, On 10.01.2014 12:45, Naveen Krishna Chatradhi wrote: This patch adds code to validate iv buffer before trying to memcpy the contents Signed-off-by: Naveen Krishna Chatradhi ch.nav...@samsung.com ---