Re: [PATCH 1/2] arch/x86/crypto/camellia_glue.c: adjust code alignment

2013-08-14 Thread Herbert Xu
On Sat, Aug 10, 2013 at 07:34:36PM +0200, Julia Lawall wrote: From: Julia Lawall julia.law...@lip6.fr Adjust alignment in automatically generated code. If this code will not be regenerated in the future, it may as well look nice. Signed-off-by: Julia Lawall julia.law...@lip6.fr ---

Re: [PATCH 1/2] arch/x86/crypto/camellia_glue.c: adjust code alignment

2013-08-14 Thread Julia Lawall
On Wed, 14 Aug 2013, Herbert Xu wrote: On Sat, Aug 10, 2013 at 07:34:36PM +0200, Julia Lawall wrote: From: Julia Lawall julia.law...@lip6.fr Adjust alignment in automatically generated code. If this code will not be regenerated in the future, it may as well look nice.

Re: [PATCH] crypto: make tables used from assembler __visible

2013-08-14 Thread Herbert Xu
On Sat, Aug 10, 2013 at 06:01:11PM -0700, Andi Kleen wrote: From: Andi Kleen a...@linux.intel.com Tables used from assembler should be marked __visible to let the compiler know. Signed-off-by: Andi Kleen a...@linux.intel.com Patch applied. Thanks Andi. -- Email: Herbert Xu

Re: [PATCH 1/2] crypto: sahara - Staticize local symbol

2013-08-14 Thread Herbert Xu
On Fri, Aug 09, 2013 at 04:57:48PM +0900, Jingoo Han wrote: This local symbol is used only in this file. Fix the following sparse warnings: drivers/crypto/sahara.c:420:6: warning: symbol 'sahara_watchdog' was not declared. Should it be static? Signed-off-by: Jingoo Han

Re: [PATCH] crypto: nx - fix concurrency issue

2013-08-14 Thread Herbert Xu
On Mon, Aug 12, 2013 at 06:49:37PM -0300, Marcelo Cerri wrote: The NX driver uses the transformation context to store several fields containing data related to the state of the operations in progress. Since a single tfm can be used by different kernel threads at the same time, we need to

[PATCH 2/2] crypto/camellia_generic.c: replace commas by semicolons and adjust code alignment

2013-08-14 Thread Julia Lawall
From: Julia Lawall julia.law...@lip6.fr Adjust alignment and replace commas by semicolons in automatically generated code. Signed-off-by: Julia Lawall julia.law...@lip6.fr --- crypto/camellia_generic.c | 48 +++--- 1 file changed, 24 insertions(+), 24

[PATCH 1/2] arch/x86/crypto/camellia_glue.c: replace commas by semicolons and adjust code alignment

2013-08-14 Thread Julia Lawall
From: Julia Lawall julia.law...@lip6.fr Adjust alignment and replace commas by semicolons in automatically generated code. Signed-off-by: Julia Lawall julia.law...@lip6.fr --- arch/x86/crypto/camellia_glue.c | 48 1 file changed, 24 insertions(+), 24

[PATCH 0/1] Check for osxsave as well as avx in crypto/xor

2013-08-14 Thread John Haxby
Hello, The crypto/xor module omits a check for osxsave. This is a problem on sufficiently new hardware but with, for example, a PV guest on a sufficiently old version of xeni (eg 3.4). This shows up on Amazon EC2 under a slightly different guise (see

[PATCH 1/1] Check for osxsave as well as avx in crypto/xor

2013-08-14 Thread John Haxby
This affects xen pv guests with sufficiently old versions of xen and sufficiently new hardware. On such a system, a guest with a btrfs root won't even boot. Signed-off-by: John Haxby john.ha...@oracle.com --- arch/x86/include/asm/xor_avx.h | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 1/2] crypto: caam - replace xstr macro with __stringify

2013-08-14 Thread Alex Porosanu
CAAM driver contains one macro (xstr) used for printing the line location in a file where a memdump is done. This patch replaces the xstr macro with the already existing __stringify macro that performs the same function. Signed-off-by: Alex Porosanu alexandru.poros...@freescale.com ---

[PATCH 2/2] crypto: caam - add option for enabling DEBUG mode

2013-08-14 Thread Alex Porosanu
This patch adds an option to the Kconfig file for SEC which enables the user to see the debug messages that are printed inside the SEC driver. Signed-off-by: Alex Porosanu alexandru.poros...@freescale.com --- drivers/crypto/caam/Kconfig |8 drivers/crypto/caam/Makefile |3 +++

[PATCH] crypto:nx - fix nx-aes-gcm verification

2013-08-14 Thread jmlatten
This patch fixes a bug in the nx-aes-gcm implementation. Corrected the code so that the authtag is always verified after decrypting and not just when there is associated data included. Also, corrected the code to retrieve the input authtag from src instead of dst. Reviewed-by: Fionnuala Gunter

[PATCH 03/10] crypto: omap-aes: Populate number of SG elements

2013-08-14 Thread Joel Fernandes
Crypto layer only passes nbytes but number of SG elements is needed for mapping/unmapping SGs at one time using dma_map* API and also needed to pass in for dmaengine prep function. We call function added to scatterwalk for this purpose in omap_aes_handle_queue to populate the values which are

[PATCH 06/10] crypto: omap-aes: Remove previously used intermediate buffers

2013-08-14 Thread Joel Fernandes
Intermdiate buffers were allocated, mapped and used for DMA. These are no longer required as we use the SGs from crypto layer directly in previous commits in the series. Also along with it, remove the logic for copying SGs etc as they are no longer used, and all the associated variables in

[PATCH 00/10] crypto: omap-aes: DMA and PIO mode improvements

2013-08-14 Thread Joel Fernandes
This patch series is a rewrite of the DMA portion of omap-aes driver and also adds support for PIO mode. Both these modes, give better performance than before. Earlier, only a single SG was used for DMA purpose, and the SG-list passed from the crypto layer was being copied and DMA'd one entry at

[PATCH 01/10] crypto: scatterwalk: Add support for calculating number of SG elements

2013-08-14 Thread Joel Fernandes
Crypto layer only passes nbytes to encrypt but in omap-aes driver we need to know number of SG elements to pass to dmaengine slave API. We add function for the same to scatterwalk library. Signed-off-by: Joel Fernandes jo...@ti.com --- crypto/scatterwalk.c | 22 ++

[PATCH 04/10] crypto: omap-aes: Simplify DMA usage by using direct SGs

2013-08-14 Thread Joel Fernandes
In early version of this driver, assumptions were made such as DMA layer requires contiguous buffers etc. Due to this, new buffers were allocated, mapped and used for DMA. These assumptions are no longer true and DMAEngine scatter-gather DMA doesn't have such requirements. We simply the DMA

[PATCH 10/10] crypto: omap-aes: Switch to PIO mode in probe function

2013-08-14 Thread Joel Fernandes
In cases where requesting for DMA channels fails for some reason, or channel numbers are not provided in DT or platform data, we switch to PIO-only mode also checking if platform provides IRQ numbers and interrupt register offsets in DT and platform data. All dma-only paths are avoided in this

[PATCH 09/10] crypto: omap-aes: PIO mode: platform data for OMAP4 and trigger it

2013-08-14 Thread Joel Fernandes
We initialize the scatter gather walk lists needed for PIO mode and avoid all DMA paths such as mapping/unmapping buffers by checking for the pio_only flag. Signed-off-by: Joel Fernandes jo...@ti.com --- drivers/crypto/omap-aes.c | 43 ++- 1 file

[PATCH 08/10] crypto: omap-aes: PIO mode: Add IRQ handler and walk SGs

2013-08-14 Thread Joel Fernandes
We add an IRQ handler that implements a state-machine for PIO-mode and data structures for walking the scatter-gather list. The IRQ handler is called in succession both when data is available to read or next data can be sent for processing. This process continues till the entire in/out SG lists

[PATCH 02/10] crypto: omap-aes: Add useful debug macros

2013-08-14 Thread Joel Fernandes
When DEBUG is enabled, these macros can be used to print variables in integer and hex format, and clearly display which registers, offsets and values are being read/written , including printing the names of the offsets and their values. Signed-off-by: Joel Fernandes jo...@ti.com ---

[PATCH 07/10] crypto: omap-aes: Add IRQ info and helper macros

2013-08-14 Thread Joel Fernandes
Add IRQ information to pdata and helper macros. These are required for PIO-mode support. Signed-off-by: Joel Fernandes jo...@ti.com --- drivers/crypto/omap-aes.c |8 1 file changed, 8 insertions(+) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c index

Re: [PATCH 02/10] crypto: omap-aes: Add useful debug macros

2013-08-14 Thread Joe Perches
On Wed, 2013-08-14 at 18:12 -0500, Joel Fernandes wrote: When DEBUG is enabled, these macros can be used to print variables in integer and hex format, and clearly display which registers, offsets and values are being read/written , including printing the names of the offsets and their values.

Re: [PATCH 00/10] crypto: omap-aes: DMA and PIO mode improvements

2013-08-14 Thread Joel Fernandes
On 08/14/2013 06:12 PM, Joel Fernandes wrote: This patch series is a rewrite of the DMA portion of omap-aes driver and also adds support for PIO mode. Both these modes, give better performance than before. Earlier, only a single SG was used for DMA purpose, and the SG-list passed from the

Re: [PATCH 02/10] crypto: omap-aes: Add useful debug macros

2013-08-14 Thread Joel Fernandes
On 08/14/2013 06:29 PM, Joe Perches wrote: On Wed, 2013-08-14 at 18:12 -0500, Joel Fernandes wrote: When DEBUG is enabled, these macros can be used to print variables in integer and hex format, and clearly display which registers, offsets and values are being read/written , including printing

Re: [PATCH 02/10] crypto: omap-aes: Add useful debug macros

2013-08-14 Thread Joe Perches
On Wed, 2013-08-14 at 18:40 -0500, Joel Fernandes wrote: On 08/14/2013 06:29 PM, Joe Perches wrote: On Wed, 2013-08-14 at 18:12 -0500, Joel Fernandes wrote: When DEBUG is enabled, these macros can be used to print variables in integer and hex format, and clearly display which registers,

Re: [PATCH 02/10] crypto: omap-aes: Add useful debug macros

2013-08-14 Thread Joel Fernandes
On 08/14/2013 07:47 PM, Joe Perches wrote: On Wed, 2013-08-14 at 18:40 -0500, Joel Fernandes wrote: On 08/14/2013 06:29 PM, Joe Perches wrote: On Wed, 2013-08-14 at 18:12 -0500, Joel Fernandes wrote: When DEBUG is enabled, these macros can be used to print variables in integer and hex format,

Re: [PATCH 00/10] crypto: omap-aes: DMA and PIO mode improvements

2013-08-14 Thread Dmitry Kasatkin
On 15/08/13 02:30, Joel Fernandes wrote: On 08/14/2013 06:12 PM, Joel Fernandes wrote: This patch series is a rewrite of the DMA portion of omap-aes driver and also adds support for PIO mode. Both these modes, give better performance than before. Earlier, only a single SG was used for DMA