[PATCH] Fixing opcode issue on vmx-crypto

2015-08-21 Thread Leonidas S Barbosa
In build time vadduqm opcode is not being mapped correctly. Adding a new map in ppc-xlate to do this. Signed-off-by: Leonidas S Barbosa leosi...@linux.vnet.ibm.com --- drivers/crypto/vmx/ppc-xlate.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/vmx/ppc-xlate.pl b/drivers

[PATCH 2/2] Fixing vmx-crypto GHASH Key issue on little endian

2015-08-14 Thread Leonidas S Barbosa
it we do a swap for loaded key. Signed-off-by: Leonidas S Barbosa leosi...@linux.vnet.ibm.com --- drivers/crypto/vmx/ghashp8-ppc.pl | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/crypto/vmx/ghashp8-ppc.pl b/drivers/crypto/vmx/ghashp8-ppc.pl index 0a6f899..d8429cb 100644

[PATCH 0/2] Uncomment VSX enable routine for instructions access

2015-07-13 Thread Leonidas S. Barbosa
() rountine and put it available for use. Also adds it in vmx_crypto in order to enable kernel_vsx before use VSX instructions. Leonidas S. Barbosa (2): Uncomment and make enable_kernel_vsx() routine available Adding enable_kernel_vsx() to access VSX instructions arch/powerpc/include/asm

[PATCH 2/2] Adding enable_kernel_vsx() to access VSX instructions

2015-07-13 Thread Leonidas S. Barbosa
vmx-crypto driver make use of some VSX instructions which are only available if VSX is enabled. Running in cases where VSX are not enabled vmx-crypto fails in a VSX exception. In order to fix this enable_kernel_vsx() was added to turn on VSX instructions for vmx-crypto. Signed-off-by: Leonidas S

[PATCH 1/2] Uncomment and make enable_kernel_vsx() routine available

2015-07-13 Thread Leonidas S. Barbosa
-by: Leonidas S. Barbosa leosi...@linux.vnet.ibm.com --- arch/powerpc/include/asm/switch_to.h | 1 + arch/powerpc/kernel/process.c| 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/switch_to.h b/arch/powerpc/include/asm/switch_to.h index 58abeda..15cca17

Re: crypto: nx - Fix reentrancy bugs

2015-07-08 Thread Leonidas S. Barbosa
PS it would appear that you can make this completely reentrant by moving all the data from the tfm into the reqeust. Could you work on this and remove the spinlock completely? Yes. Thank you! -- To unsubscribe from this list: send the line unsubscribe linux-crypto in the body of a message

[PATCH 2/2] Fixing SHA update bug

2015-04-23 Thread Leonidas S. Barbosa
this eliminate the nx_sha_build_sg_list, that is useless in SHA's algorithm context. Instead we call nx_build_sg_list directly and pass a previous calculated max_sg_len to it. Signed-off-by: Leonidas S. Barbosa leosi...@linux.vnet.ibm.com --- drivers/crypto/nx/nx-sha256.c | 84

[PATCH 1/2] Fixing NX data alignment with nx_sg list

2015-04-23 Thread Leonidas S. Barbosa
fields returning a -23 H_ST_PARM error, or invalid operation. This patch fix this recalculating how much data should be put back in to_process variable what assures the size of sg_list will be correct with size of the data. Signed-off-by: Leonidas S. Barbosa leosi...@linux.vnet.ibm.com

Re: linux-next: Tree for Mar 11 (powerpc build failure due to vmx crypto code)

2015-03-12 Thread Leonidas S. Barbosa
A little bit later, but thank you guys for fix it. The issue seems happens just in BE machines, and using _GLOBAL instead .globl seems fix it so build the correct vmx-crypto.ko. On LE it does not happens. On Thu, Mar 12, 2015 at 02:53:27PM +1100, Herbert Xu wrote: On Wed, Mar 11, 2015 at

Re: [PATCH 7/7] Enabling VMX module for PPC64

2015-02-06 Thread Leonidas S. Barbosa
Thanks for the advices Paul. Resending patch set as V2. +vmx-crypto-objs := vmx.o aesp8-ppc.o ghashp8-ppc.o aes.o aes_cbc.o aes_ctr.o ghash.o + +ifeq ($(CONFIG_PPC64),y) Can this test ever fail? In fact we don't need this first IF, since it already depends on PPC64. --- Leonidas.

[PATCHv2 0/7] Add VMX module for PPC64

2015-02-06 Thread Leonidas S. Barbosa
on Power 8 CPU this module uses scripts implemented in colaboration with OpenSSL. Changelog[v2] 1. Patch style fixes 2. Redo unecessary conditions on drivers/crypto/Kconfig and vmx/Makefile in previous [Patch 7/7] Leonidas S. Barbosa (2): Add support for VMS instructions by ASM Enabling VMX

[PATCHv2 6/7] Add support for VMS instructions by ASM

2015-02-06 Thread Leonidas S. Barbosa
processor. - ghashp8-ppc.pl: implements support for GHASH for Power8. - ppc-xlate.pl: ppc assembler distiller. These code has been adopted from OpenSSL project in collaboration with the original author (Andy Polyakov ap...@openssl.org). Signed-off-by: Leonidas S. Barbosa leosi

[PATCHv2 7/7] Enabling VMX module for PPC64

2015-02-06 Thread Leonidas S. Barbosa
This patch enables VMX module in PPC64. Signed-off-by: Leonidas S. Barbosa leosi...@linux.vnet.ibm.com --- drivers/crypto/Kconfig | 9 + drivers/crypto/Makefile | 1 + drivers/crypto/vmx/Kconfig | 8 drivers/crypto/vmx/Makefile | 19 +++ 4 files

[PATCH 0/7] Add VMX module for PPC64

2015-02-05 Thread Leonidas S. Barbosa
instructions on Power 8 CPU this module uses scripts implemented in colaboration with OpenSSL. Leonidas S. Barbosa (2): Add support for VMS instructions by ASM Enabling VMX module for PPC64 Marcelo H. Cerri (5): Adding VMX module for Power 8 Adding AES routines for VMX module Adding CBC routines

[PATCH 7/7] Enabling VMX module for PPC64

2015-02-05 Thread Leonidas S. Barbosa
This patch enables VMX module in PPC64. Signed-off-by: Leonidas S. Barbosa leosi...@linux.vnet.ibm.com --- drivers/crypto/Kconfig | 12 drivers/crypto/Makefile | 1 + drivers/crypto/vmx/Kconfig | 9 + drivers/crypto/vmx/Makefile | 21 + 4

[PATCH 6/7] Add support for VMS instructions by ASM

2015-02-05 Thread Leonidas S. Barbosa
processor. - ghashp8-ppc.pl: implements support for GHASH for Power8. - ppc-xlate.pl: ppc assembler distiller. These code has been adopted from OpenSSL project in collaboration with the original author (Andy Polyakov ap...@openssl.org). Signed-off-by: Leonidas S. Barbosa leosi

[PATCH 0/9] NX crypto driver fixes

2014-10-28 Thread Leonidas S. Barbosa
This patch set fixes the follow issues in NX crypto driver: - Bound limit issue that causes a memory crash - SHA concurrence issue - IV vector fix with the correct bit order - NX CCM does not support keys larger than 128 causing crashes in fips mode. Leonidas S. Barbosa (9): Moving

[PATCH 1/9] Moving NX-AES-CBC to be processed logic

2014-10-28 Thread Leonidas S. Barbosa
and replaces it into nx_sg_build_lists in order to build a correct nx_sg list using the correct sg_max limit and bounds. Signed-off-by: Leonidas S. Barbosa leosi...@linux.vnet.ibm.com --- drivers/crypto/nx/nx-aes-cbc.c | 12 ++-- 1 files changed, 2 insertions(+), 10 deletions(-) diff

[PATCH 2/9] Moving NX-AES-CCM to be processed logic and sg_list bounds

2014-10-28 Thread Leonidas S. Barbosa
and replaces it into nx_sg_build_lists in order to build a correct nx_sg list using the correct sg_max limit and bounds. Signed-off-by: Leonidas S. Barbosa leosi...@linux.vnet.ibm.com --- drivers/crypto/nx/nx-aes-ccm.c | 61 +-- 1 files changed, 27 insertions

[PATCH 3/9] Moving limit and bound logic in CTR and fix IV vector

2014-10-28 Thread Leonidas S. Barbosa
logic and replaces it into nx_sg_build_lists in order to build a correct nx_sg list using the correct sg_max limit and bounds. IV vector was not set correctly to zero causing ctr crash in tcrypt tests. - Fixed setting IV vector bits to zero. Signed-off-by: Leonidas S. Barbosa leosi

[PATCH 4/9] Moving NX-AES-ECB to be processed logic

2014-10-28 Thread Leonidas S. Barbosa
and replaces it into nx_sg_build_lists in order to build a correct nx_sg list using the correct sg_max limit and bounds. Signed-off-by: Leonidas S. Barbosa leosi...@linux.vnet.ibm.com --- drivers/crypto/nx/nx-aes-ecb.c | 12 ++-- 1 files changed, 2 insertions(+), 10 deletions(-) diff

[PATCH 5/9] Moving NX-AES-GCM to be processed logic

2014-10-28 Thread Leonidas S. Barbosa
and replace it into nx_sg_build_lists in order to build a correct nx_sg list using the correct sg_max limit and bounds. Signed-off-by: Leonidas S. Barbosa leosi...@linux.vnet.ibm.com --- drivers/crypto/nx/nx-aes-gcm.c | 66 ++- 1 files changed, 37 insertions

[PATCH 6/9] Moving NX-AES-XCBC to be processed logic

2014-10-28 Thread Leonidas S. Barbosa
and replaces it into nx_sg_build_lists in order to build a correct nx_sg list using the correct sg_max limit and bounds. Signed-off-by: Leonidas S. Barbosa leosi...@linux.vnet.ibm.com --- drivers/crypto/nx/nx-aes-xcbc.c | 81 ++- 1 files changed, 63

[PATCH 7/9] Fix SHA concurrence issue and sg limit bounds

2014-10-28 Thread Leonidas S. Barbosa
with the hashe's state. Also fixes and does some clean ups regarding the right sg max limit and bounds to the sg list avoind a memory crash. Signed-off-by: Leonidas S. Barbosa leosi...@linux.vnet.ibm.com --- drivers/crypto/nx/nx-sha256.c | 208 ++ drivers

[PATCH 9/9] Disable ccm and ccm4309 in fips mod

2014-10-28 Thread Leonidas S. Barbosa
NX CCM has not support to keys larger than 128 neither our hardware. In cases where a system is running in fips mode enabled a tcrypt test will crash the system in a kernel panic call. This patch disable, for now, CCM's algorithms in fips mode to avoid this. Signed-off-by: Leonidas S. Barbosa

[PATCH 8/9] Fixing the limit number of bytes to be processed

2014-10-28 Thread Leonidas S. Barbosa
-off-by: Leonidas S. Barbosa leosi...@linux.vnet.ibm.com --- drivers/crypto/nx/nx.c | 127 --- drivers/crypto/nx/nx.h |8 ++- 2 files changed, 113 insertions(+), 22 deletions(-) diff --git a/drivers/crypto/nx/nx.c b/drivers/crypto/nx/nx.c index

tcrypt rfc4309 ccm test keys size issue

2014-09-18 Thread Leonidas S. Barbosa
Hi, I'm facing an issue running tcrypt with rfc4309-aes-ccm. My hardware and drive only implements support to key size 128, what is specify in the documentation (http://tools.ietf.org/html/rfc4309) as a 'MUST' support, but does not support the other sizes. However tcrypt tests not only 128, but