[PATCH 4/4] crypto: ccp - Perform completion callbacks using a tasklet

2014-01-24 Thread Tom Lendacky
Change from scheduling work to scheduling a tasklet to perform the callback operations. Signed-off-by: Tom Lendacky thomas.lenda...@amd.com --- drivers/crypto/ccp/ccp-dev.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/ccp/ccp-dev.c b

[PATCH 3/4] crypto: ccp - Use a single queue for proper ordering of tfm requests

2014-01-24 Thread Tom Lendacky
Move to a single queue to serialize requests within a tfm. When testing using IPSec with a large number of network connections the per cpu tfm queuing logic was not working properly. Signed-off-by: Tom Lendacky thomas.lenda...@amd.com --- drivers/crypto/ccp/ccp-crypto-main.c | 164

[PATCH 0/4] crypto: ccp - selective algorithm registration and ipsec-related fixes

2014-01-24 Thread Tom Lendacky
was not working properly so a single queue is used now. This patch series is based on the cryptodev-2.6 kernel tree. --- Tom Lendacky (4): crypto: ccp - Allow for selective disablement of crypto API algorithms crypto: ccp - Move HMAC calculation down to ccp ops file crypto: ccp - Use

[PATCH 2/4] crypto: ccp - Move HMAC calculation down to ccp ops file

2014-01-24 Thread Tom Lendacky
Move the support to perform an HMAC calculation into the CCP operations file. This eliminates the need to perform a synchronous SHA operation used to calculate the HMAC. Signed-off-by: Tom Lendacky thomas.lenda...@amd.com --- drivers/crypto/ccp/ccp-crypto-sha.c | 130

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

2014-01-14 Thread Tom Lendacky
data in ahash_op_unaligned_done() and cause corruption. Signed-off-by: Marek Vasut ma...@denx.de Cc: David S. Miller da...@davemloft.net Cc: Fabio Estevam fabio.este...@freescale.com Cc: Herbert Xu herb...@gondor.apana.org.au Cc: Shawn Guo shawn@linaro.org Cc: Tom Lendacky

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

2014-01-06 Thread Tom Lendacky
on the cryptodev-2.6 kernel tree. --- Tom Lendacky (6): crypto: ccp - Apply appropriate gfp_t type to memory allocations crypto: ccp - Cleanup scatterlist usage crypto: ccp - Check for caller result area before using it crypto: ccp - Change data length declarations to u64 crypto

[PATCH 5/6] crypto: ccp - Cleanup hash invocation calls

2014-01-06 Thread Tom Lendacky
Cleanup the ahash digest invocations to check the init return code and make use of the finup routine. Signed-off-by: Tom Lendacky thomas.lenda...@amd.com --- drivers/crypto/ccp/ccp-crypto-aes-cmac.c |2 +- drivers/crypto/ccp/ccp-crypto-sha.c |8 ++-- 2 files changed, 7

[PATCH 2/6] crypto: ccp - Cleanup scatterlist usage

2014-01-06 Thread Tom Lendacky
Cleanup up the usage of scatterlists to make the code cleaner and avoid extra memory allocations when not needed. Signed-off-by: Tom Lendacky thomas.lenda...@amd.com --- drivers/crypto/ccp/ccp-crypto-aes-cmac.c |6 ++- drivers/crypto/ccp/ccp-crypto-sha.c | 53

[PATCH 3/6] crypto: ccp - Check for caller result area before using it

2014-01-06 Thread Tom Lendacky
For a hash operation, the caller doesn't have to supply a result area on every call so don't use it / update it if it hasn't been supplied. Signed-off-by: Tom Lendacky thomas.lenda...@amd.com --- drivers/crypto/ccp/ccp-crypto-aes-cmac.c |4 +++- drivers/crypto/ccp/ccp-crypto-sha.c

[PATCH 4/6] crypto: ccp - Change data length declarations to u64

2014-01-06 Thread Tom Lendacky
operations. Signed-off-by: Tom Lendacky thomas.lenda...@amd.com --- drivers/crypto/ccp/ccp-crypto-aes-cmac.c | 21 +++ drivers/crypto/ccp/ccp-crypto-sha.c | 21 +++ drivers/crypto/ccp/ccp-crypto.h | 10 +++-- drivers/crypto/ccp/ccp-ops.c

[PATCH 6/6] crypto: ccp - CCP device enabled/disabled changes

2014-01-06 Thread Tom Lendacky
The CCP cannot be hot-plugged so it will either be there or it won't. Do not allow the driver to stay loaded if the CCP does not successfully initialize. Provide stub routines in the ccp.h file that return -ENODEV if the CCP has not been configured in the build. Signed-off-by: Tom Lendacky

[PATCH 1/6] crypto: ccp - Apply appropriate gfp_t type to memory allocations

2014-01-06 Thread Tom Lendacky
Fix some memory allocations to use the appropriate gfp_t type based on the CRYPTO_TFM_REQ_MAY_SLEEP flag. Signed-off-by: Tom Lendacky thomas.lenda...@amd.com --- drivers/crypto/ccp/ccp-crypto-aes-cmac.c |5 - drivers/crypto/ccp/ccp-crypto-sha.c |5 - 2 files changed, 8

Re: [PATCH 1/5] crypto: Fully restore ahash request before completing

2014-01-03 Thread Tom Lendacky
On Monday, December 30, 2013 05:01:13 PM Herbert Xu wrote: On Fri, Dec 27, 2013 at 01:21:36AM +0100, Marek Vasut wrote: - complete(data, err); + areq-base.complete = complete; + areq-base.data = data; + + complete(areq-base, err); This looks

[PATCH -next] Re: randconfig build error with next-20131210, in drivers/crypto/ccp/ccp-pci.c

2013-12-20 Thread Tom Lendacky
On Thursday, December 19, 2013 11:35:09 AM Randy Dunlap wrote: On 12/10/13 07:34, Tom Lendacky wrote: On Tuesday, December 10, 2013 07:21:36 AM Jim Davis wrote: Building with the attached random configuration file, drivers/crypto/ccp/ccp-pci.c: In function ‘ccp_get_msix_irqs

Re: crypto: ccp - CCP SHA crypto API support

2013-12-11 Thread Tom Lendacky
On Wednesday, December 11, 2013 01:51:50 PM Dan Carpenter wrote: Hello Tom Lendacky, The patch 0ab0a1d505ab: crypto: ccp - CCP SHA crypto API support from Nov 12, 2013, leads to the following static checker warning: drivers/crypto/ccp/ccp-crypto-sha.c:182 ccp_do_sha_update

Re: randconfig build error with next-20131210, in drivers/crypto/ccp

2013-12-10 Thread Tom Lendacky
On Monday, December 09, 2013 10:30:17 PM Jim Davis wrote: Building with the attached random configuration file, drivers/built-in.o: In function `ccp_init': /home/jim/linux/drivers/crypto/ccp/ccp-dev.c:402: undefined reference to `hwrng_register' drivers/built-in.o: In function

Re: randconfig build error with next-20131210, in drivers/crypto/ccp/ccp-pci.c

2013-12-10 Thread Tom Lendacky
On Tuesday, December 10, 2013 07:21:36 AM Jim Davis wrote: Building with the attached random configuration file, drivers/crypto/ccp/ccp-pci.c: In function ‘ccp_get_msix_irqs’: drivers/crypto/ccp/ccp-pci.c:44:20: error: array type has incomplete element type

[PATCH 0/3] crypto: ccp - code fixes/cleanup

2013-12-10 Thread Tom Lendacky
The following series implements fixes and cleanup for some reported errors and suggestions (sparse errors, randconfig build errors and pr_err usage). This patch series is based on the cryptodev-2.6 kernel tree. --- Tom Lendacky (3): crypto: ccp - Fix sparse warnings in ccp-crypto-sha.c

[PATCH 1/3] crypto: ccp - Fix sparse warnings in ccp-crypto-sha.c

2013-12-10 Thread Tom Lendacky
The sha initialization data generated the following sparse warnings: sparse: incorrect type in initializer (different base types) expected unsigned int got restricted __be32 [usertype] noident Change the initialization data type from u32 to __be32. Signed-off-by: Tom Lendacky

[PATCH 2/3] crypto: ccp - CCP Kconfig fixes

2013-12-10 Thread Tom Lendacky
Update the Kconfig to include PCI on the 'depends on' and add 'select HW_RANDOM' to insure the necessary PCI and HW_RANDOM functions are available/included in the build. Signed-off-by: Tom Lendacky thomas.lenda...@amd.com --- drivers/crypto/Kconfig |2 +- drivers/crypto/ccp/Kconfig

[PATCH 3/3] crypto: ccp - Remove user triggerable pr_err calls

2013-12-10 Thread Tom Lendacky
Remove the pr_err calls that are issued during parameter checking in some AES operations. This will eliminate the possibility of filling up syslog through these paths. Signed-off-by: Tom Lendacky thomas.lenda...@amd.com --- drivers/crypto/ccp/ccp-crypto-aes-cmac.c |4 +--- drivers/crypto/ccp

Re: scatterlist.h backtrace from crypto ccm module

2013-12-05 Thread Tom Lendacky
On Thursday, December 05, 2013 09:03:02 AM Josh Boyer wrote: Hi All, We've had a report [1] of the backtrace below on the latest rawhide kernel, which is essentially Linus' tree as of yesterday. We aren't carrying any patches to crypto at the moment. It's basically hitting the second

[PATCH] crypto: scatterwalk - Use sg_chain_ptr on chain entries

2013-12-05 Thread Tom Lendacky
Now that scatterwalk_sg_chain sets the chain pointer bit the sg_page call in scatterwalk_sg_next hits a BUG_ON when CONFIG_DEBUG_SG is enabled. Use sg_chain_ptr instead of sg_page on a chain entry. Signed-off-by: Tom Lendacky thomas.lenda...@amd.com --- include/crypto/scatterwalk.h |2 +- 1

Re: [PATCH 00/10] AMD Cryptographic Coprocessor support

2013-11-20 Thread Tom Lendacky
Hi Herbert, Is the crypto tree the right tree to go through for this support or would you prefer I go through another tree? Thanks, Tom On Tuesday, November 12, 2013 11:45:59 AM Tom Lendacky wrote: Resending because of typo in mailing list address... The following series implements support

[PATCH 05/10] crypto: CCP AES crypto API support

2013-11-12 Thread Tom Lendacky
These routines provide crypto API support for AES on the AMD CCP. Support for AES modes: ECB, CBC, OFB, CFB and CTR Signed-off-by: Tom Lendacky thomas.lenda...@amd.com --- drivers/crypto/ccp/ccp-crypto-aes.c | 375 +++ 1 file changed, 375 insertions(+) create

[PATCH 02/10] crypto: scatterwalk - Set the chain pointer indication bit

2013-11-12 Thread Tom Lendacky
sg_nents does not follow the chain pointer to the chained scatterlist. Update scatterwalk_sg_chain to set the chain pointer indication bit as is done by the sg_chain function. Signed-off-by: Tom Lendacky thomas.lenda...@amd.com --- include/crypto/scatterwalk.h |1 + 1 file changed, 1 insertion

[PATCH 01/10] crypto: authenc - Find proper IV address in ablkcipher callback

2013-11-12 Thread Tom Lendacky
in crypto_authenc_encrypt function which sets up the callback. Signed-off-by: Tom Lendacky thomas.lenda...@amd.com --- crypto/authenc.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crypto/authenc.c b/crypto/authenc.c index ffce19d..528b00b 100644 --- a/crypto/authenc.c +++ b

[PATCH 00/10] AMD Cryptographic Coprocessor support

2013-11-12 Thread Tom Lendacky
Resending because of typo in mailing list address... The following series implements support for the AMD Cryptographic Coprocessor (CCP). The AMD CCP provides hardware encryption, hashing and other related operations. This patch series is based on the 3.12 kernel. --- Tom Lendacky (10

[PATCH 09/10] crytpo: CCP device driver build files

2013-11-12 Thread Tom Lendacky
These files provide the ability to configure and build the AMD CCP device driver and crypto API support. Signed-off-by: Tom Lendacky thomas.lenda...@amd.com --- drivers/crypto/Kconfig | 12 drivers/crypto/Makefile |1 + drivers/crypto/ccp/Kconfig | 23

[PATCH 10/10] crypto: CCP maintainer information

2013-11-12 Thread Tom Lendacky
Update the MAINTAINERS file for the AMD CCP device driver. Signed-off-by: Tom Lendacky thomas.lenda...@amd.com --- MAINTAINERS |7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 051e4dc..de22604 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -525,6

[PATCH 04/10] crypto: crypto API interface to the CCP device driver

2013-11-12 Thread Tom Lendacky
These routines provide the support for the interface between the crypto API and the AMD CCP. This includes insuring that requests associated with a given tfm on the same cpu are processed in the order received. Signed-off-by: Tom Lendacky thomas.lenda...@amd.com --- drivers/crypto/ccp/ccp-crypto

[PATCH 06/10] crypto: CCP AES CMAC mode crypto API support

2013-11-12 Thread Tom Lendacky
These routines provide crypto API support for the CMAC mode of AES on the AMD CCP. Signed-off-by: Tom Lendacky thomas.lenda...@amd.com --- drivers/crypto/ccp/ccp-crypto-aes-cmac.c | 355 ++ 1 file changed, 355 insertions(+) create mode 100644 drivers/crypto/ccp/ccp

<    1   2