diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2016-04-16 21:05:48 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2016-04-16 21:05:48 +0000 |
commit | f0b3964f1b8c2092e4eb1c467c9730a3adbe6c6b (patch) | |
tree | c39e3a477111f347c5ab70ad4246ce8121797d32 /target/linux/generic/patches-4.4/150-crypto-ccp-add-hash-state-import-and-export-support.patch | |
parent | 1414f1647d435a7eda48d9433a022286a46d9097 (diff) | |
download | upstream-f0b3964f1b8c2092e4eb1c467c9730a3adbe6c6b.tar.gz upstream-f0b3964f1b8c2092e4eb1c467c9730a3adbe6c6b.tar.bz2 upstream-f0b3964f1b8c2092e4eb1c467c9730a3adbe6c6b.zip |
kernel: update kernel 4.4 to version 4.4.7
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
SVN-Revision: 49176
Diffstat (limited to 'target/linux/generic/patches-4.4/150-crypto-ccp-add-hash-state-import-and-export-support.patch')
-rw-r--r-- | target/linux/generic/patches-4.4/150-crypto-ccp-add-hash-state-import-and-export-support.patch | 114 |
1 files changed, 0 insertions, 114 deletions
diff --git a/target/linux/generic/patches-4.4/150-crypto-ccp-add-hash-state-import-and-export-support.patch b/target/linux/generic/patches-4.4/150-crypto-ccp-add-hash-state-import-and-export-support.patch deleted file mode 100644 index 986ac5d253..0000000000 --- a/target/linux/generic/patches-4.4/150-crypto-ccp-add-hash-state-import-and-export-support.patch +++ /dev/null @@ -1,114 +0,0 @@ -From: Tom Lendacky <thomas.lendacky@amd.com> -Subject: [PATCH v1] crypto: ccp - Add hash state import and export support -Date: Tue, 12 Jan 2016 11:17:38 -0600 -Message-ID: <20160112171738.23496.44254.stgit@tlendack-t1.amdoffice.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset="utf-8" -Content-Transfer-Encoding: 7bit -Cc: Herbert Xu <herbert@gondor.apana.org.au>, <stable@vger.kernel.org>, - "David Miller" <davem@davemloft.net> -To: <linux-crypto@vger.kernel.org> - -Commit 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero") -added a check to prevent ahash algorithms from successfully registering -if the import and export functions were not implemented. This prevents -an oops in the hash_accept function of algif_hash. This commit causes -the ccp-crypto module SHA support and AES CMAC support from successfully -registering and causing the ccp-crypto module load to fail because the -ahash import and export functions are not implemented. - -Update the CCP Crypto API support to provide import and export support -for ahash algorithms. - -Cc: <stable@vger.kernel.org> # 3.14.x- -Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> ---- - drivers/crypto/ccp/ccp-crypto-aes-cmac.c | 23 +++++++++++++++++++++++ - drivers/crypto/ccp/ccp-crypto-sha.c | 23 +++++++++++++++++++++++ - 2 files changed, 46 insertions(+) - ---- a/drivers/crypto/ccp/ccp-crypto-aes-cmac.c -+++ b/drivers/crypto/ccp/ccp-crypto-aes-cmac.c -@@ -220,6 +220,26 @@ static int ccp_aes_cmac_digest(struct ah - return ccp_aes_cmac_finup(req); - } - -+static int ccp_aes_cmac_export(struct ahash_request *req, void *out) -+{ -+ struct ccp_aes_cmac_req_ctx *rctx = ahash_request_ctx(req); -+ struct ccp_aes_cmac_req_ctx *state = out; -+ -+ *state = *rctx; -+ -+ return 0; -+} -+ -+static int ccp_aes_cmac_import(struct ahash_request *req, const void *in) -+{ -+ struct ccp_aes_cmac_req_ctx *rctx = ahash_request_ctx(req); -+ const struct ccp_aes_cmac_req_ctx *state = in; -+ -+ *rctx = *state; -+ -+ return 0; -+} -+ - static int ccp_aes_cmac_setkey(struct crypto_ahash *tfm, const u8 *key, - unsigned int key_len) - { -@@ -352,10 +372,13 @@ int ccp_register_aes_cmac_algs(struct li - alg->final = ccp_aes_cmac_final; - alg->finup = ccp_aes_cmac_finup; - alg->digest = ccp_aes_cmac_digest; -+ alg->export = ccp_aes_cmac_export; -+ alg->import = ccp_aes_cmac_import; - alg->setkey = ccp_aes_cmac_setkey; - - halg = &alg->halg; - halg->digestsize = AES_BLOCK_SIZE; -+ halg->statesize = sizeof(struct ccp_aes_cmac_req_ctx); - - base = &halg->base; - snprintf(base->cra_name, CRYPTO_MAX_ALG_NAME, "cmac(aes)"); ---- a/drivers/crypto/ccp/ccp-crypto-sha.c -+++ b/drivers/crypto/ccp/ccp-crypto-sha.c -@@ -207,6 +207,26 @@ static int ccp_sha_digest(struct ahash_r - return ccp_sha_finup(req); - } - -+static int ccp_sha_export(struct ahash_request *req, void *out) -+{ -+ struct ccp_sha_req_ctx *rctx = ahash_request_ctx(req); -+ struct ccp_sha_req_ctx *state = out; -+ -+ *state = *rctx; -+ -+ return 0; -+} -+ -+static int ccp_sha_import(struct ahash_request *req, const void *in) -+{ -+ struct ccp_sha_req_ctx *rctx = ahash_request_ctx(req); -+ const struct ccp_sha_req_ctx *state = in; -+ -+ *rctx = *state; -+ -+ return 0; -+} -+ - static int ccp_sha_setkey(struct crypto_ahash *tfm, const u8 *key, - unsigned int key_len) - { -@@ -403,9 +423,12 @@ static int ccp_register_sha_alg(struct l - alg->final = ccp_sha_final; - alg->finup = ccp_sha_finup; - alg->digest = ccp_sha_digest; -+ alg->export = ccp_sha_export; -+ alg->import = ccp_sha_import; - - halg = &alg->halg; - halg->digestsize = def->digest_size; -+ halg->statesize = sizeof(struct ccp_sha_req_ctx); - - base = &halg->base; - snprintf(base->cra_name, CRYPTO_MAX_ALG_NAME, "%s", def->name); |