aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/ccp/ccp-crypto.h
diff options
context:
space:
mode:
authorTom Lendacky <thomas.lendacky@amd.com>2016-01-29 12:45:14 -0600
committerHerbert Xu <herbert@gondor.apana.org.au>2016-02-01 22:27:05 +0800
commitd1662165ae612ec8b5f94a6b07e65ea58b6dce34 (patch)
tree7aab5279425b9e40e844c7d2237b6e952e708bb3 /drivers/crypto/ccp/ccp-crypto.h
parentcrypto: omap-aes - Support crypto engine framework (diff)
downloadlinux-dev-d1662165ae612ec8b5f94a6b07e65ea58b6dce34.tar.xz
linux-dev-d1662165ae612ec8b5f94a6b07e65ea58b6dce34.zip
crypto: ccp - Limit the amount of information exported
Since the exported information can be exposed to user-space, instead of exporting the entire request context only export the minimum information needed. Cc: <stable@vger.kernel.org> # 3.14.x- Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccp/ccp-crypto.h')
-rw-r--r--drivers/crypto/ccp/ccp-crypto.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/crypto/ccp/ccp-crypto.h b/drivers/crypto/ccp/ccp-crypto.h
index 76a96f0f44c6..a326ec20bfa8 100644
--- a/drivers/crypto/ccp/ccp-crypto.h
+++ b/drivers/crypto/ccp/ccp-crypto.h
@@ -129,6 +129,15 @@ struct ccp_aes_cmac_req_ctx {
struct ccp_cmd cmd;
};
+struct ccp_aes_cmac_exp_ctx {
+ unsigned int null_msg;
+
+ u8 iv[AES_BLOCK_SIZE];
+
+ unsigned int buf_count;
+ u8 buf[AES_BLOCK_SIZE];
+};
+
/***** SHA related defines *****/
#define MAX_SHA_CONTEXT_SIZE SHA256_DIGEST_SIZE
#define MAX_SHA_BLOCK_SIZE SHA256_BLOCK_SIZE
@@ -171,6 +180,19 @@ struct ccp_sha_req_ctx {
struct ccp_cmd cmd;
};
+struct ccp_sha_exp_ctx {
+ enum ccp_sha_type type;
+
+ u64 msg_bits;
+
+ unsigned int first;
+
+ u8 ctx[MAX_SHA_CONTEXT_SIZE];
+
+ unsigned int buf_count;
+ u8 buf[MAX_SHA_BLOCK_SIZE];
+};
+
/***** Common Context Structure *****/
struct ccp_ctx {
int (*complete)(struct crypto_async_request *req, int ret);