aboutsummaryrefslogtreecommitdiff
path: root/drivers/crypto/ccp
AgeCommit message (Collapse)AuthorFilesLines
2014-02-27crypto: ccp - Invoke context callback when there is a backlog errorTom Lendacky1-0/+3
Invoke the callback routine associated with the crypto context if an error is encountered sending the command to the CCP during backlog processing. This is needed to free any resources used by the command. Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2014-02-27crypto: ccp - Prevent a possible lost CCP command requestTom Lendacky1-0/+4
If a CCP command has been queued for processing at the crypto layer then, when dequeueing it for processing, the "can backlog" flag must be set so that the request isn't lost if the CCP backlog queue limit is reached. Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2014-02-09crypto: ccp - Perform completion callbacks using a taskletTom Lendacky1-4/+17
Change from scheduling work to scheduling a tasklet to perform the callback operations. Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2014-02-09crypto: ccp - Use a single queue for proper ordering of tfm requestsTom Lendacky1-116/+48
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2014-02-09crypto: ccp - Move HMAC calculation down to ccp ops fileTom Lendacky3-110/+132
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2014-02-09crypto: ccp - Allow for selective disablement of crypto API algorithmsTom Lendacky1-12/+25
Introduce module parameters that allow for disabling of a crypto algorithm by not registering the algorithm with the crypto API. Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2014-02-09crypto: ccp - Fix ccp_run_passthru_cmd dma variable assignmentsDave Jones1-2/+2
There are some suspicious looking lines of code in the new ccp driver, including one that assigns a variable to itself, and another that overwrites a previous assignment. This may have been a cut-and-paste error where 'src' was forgotten to be changed to 'dst'. I have no hardware to test this, so this is untested. Signed-off-by: Dave Jones <[email protected]> Acked-by: Tom Lendacky <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2014-01-15crypto: ccp - CCP device enabled/disabled changesTom Lendacky2-1/+17
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2014-01-15crypto: ccp - Cleanup hash invocation callsTom Lendacky2-3/+7
Cleanup the ahash digest invocations to check the init return code and make use of the finup routine. Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2014-01-15crypto: ccp - Change data length declarations to u64Tom Lendacky4-33/+53
When performing a hash operation if the amount of data buffered and a request at or near the maximum data length is received then the length calcuation could wrap causing an error in executing the hash operation. Fix this by using a u64 type for the input and output data lengths in all CCP operations. Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2014-01-15crypto: ccp - Check for caller result area before using itTom Lendacky2-3/+8
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2014-01-15crypto: ccp - Cleanup scatterlist usageTom Lendacky2-26/+33
Cleanup up the usage of scatterlists to make the code cleaner and avoid extra memory allocations when not needed. Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2014-01-15crypto: ccp - Apply appropriate gfp_t type to memory allocationsTom Lendacky2-2/+8
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-12-30crypto: ccp - Remove redundant dev_set_drvdataSachin Kamat1-2/+0
Driver core sets it to NULL upon probe failure or release. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-12-20crypto: ccp - Remove user triggerable pr_err callsTom Lendacky3-21/+7
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-12-20crypto: ccp - CCP Kconfig fixesTom Lendacky1-0/+1
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-12-20crypto: ccp - Fix sparse warnings in ccp-crypto-sha.cTom Lendacky2-5/+5
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-12-09crytpo: ccp - fix coccinelle warningsFengguang Wu3-4/+4
drivers/crypto/ccp/ccp-crypto-aes.c:344:1-7: Replace memcpy with struct assignment drivers/crypto/ccp/ccp-crypto-sha.c:398:1-7: Replace memcpy with struct assignment drivers/crypto/ccp/ccp-dev.c:578:2-3: Unneeded semicolon /c/kernel-tests/src/cocci/drivers/crypto/ccp/ccp-dev.c:565:2-3: Unneeded semicolon Generated by: coccinelle/misc/memcpy-assign.cocci CC: Tom Lendacky <[email protected]> Signed-off-by: Fengguang Wu <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-12-05crytpo: ccp - CCP device driver build filesTom Lendacky2-0/+33
These files provide the ability to configure and build the AMD CCP device driver and crypto API support. Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-12-05crypto: ccp - CCP SHA crypto API supportTom Lendacky1-0/+497
These routines provide crypto API support for SHA1, SHA224 and SHA256 on the AMD CCP. HMAC support for these SHA modes is also provided. Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-12-05crypto: ccp - CCP XTS-AES crypto API supportTom Lendacky1-0/+285
These routines provide crypto API support for the XTS-AES mode of AES on the AMD CCP. Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-12-05crypto: ccp - CCP AES CMAC mode crypto API supportTom Lendacky1-0/+355
These routines provide crypto API support for the CMAC mode of AES on the AMD CCP. Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-12-05crypto: ccp - CCP AES crypto API supportTom Lendacky1-0/+375
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-12-05crypto: ccp - crypto API interface to the CCP device driverTom Lendacky2-0/+623
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-12-05crypto: ccp - CCP device driver and interface supportTom Lendacky4-0/+3234
These routines provide the device driver support for the AMD Cryptographic Coprocessor (CCP). Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: Herbert Xu <[email protected]>