From e5e0b7344822a3fd9f24d5253ae828d3acbca09c Mon Sep 17 00:00:00 2001 From: Cristian Stoica Date: Wed, 7 Jan 2015 17:55:01 +0800 Subject: cryptodev: update origin and remove stale patches - Nikos handed over project maintainance to Phil Sutter. - Several pending patches have been merged upstream so we removed them from the recipe. The remaining ones have been sorted Signed-off-by: Cristian Stoica Change-Id: I0c6160c739d379ba787e72423d1564b9a3d05d8b Reviewed-on: http://git.am.freescale.net:8181/24177 Reviewed-by: Zhenhua Luo Tested-by: Zhenhua Luo --- ...on-local-storage-for-cipher-and-hmac-keys.patch | 87 ---------------------- 1 file changed, 87 deletions(-) delete mode 100644 recipes-kernel/cryptodev/cryptodev-fsl/0002-use-function-local-storage-for-cipher-and-hmac-keys.patch (limited to 'recipes-kernel/cryptodev/cryptodev-fsl/0002-use-function-local-storage-for-cipher-and-hmac-keys.patch') diff --git a/recipes-kernel/cryptodev/cryptodev-fsl/0002-use-function-local-storage-for-cipher-and-hmac-keys.patch b/recipes-kernel/cryptodev/cryptodev-fsl/0002-use-function-local-storage-for-cipher-and-hmac-keys.patch deleted file mode 100644 index 4702fd4..0000000 --- a/recipes-kernel/cryptodev/cryptodev-fsl/0002-use-function-local-storage-for-cipher-and-hmac-keys.patch +++ /dev/null @@ -1,87 +0,0 @@ -From cc65307405a21c3b709ca6f2a6f64ff0c67c0eed Mon Sep 17 00:00:00 2001 -From: Cristian Stoica -Date: Wed, 18 Sep 2013 13:42:31 +0300 -Subject: [[Patch][fsl 02/16] use function-local storage for cipher and hmac - keys - -Upstream-status: Pending - -This refactorization is necessary for next patches that add support for -aead composite ciphers where the aead key is the sum of cipher and hmac -keys. - -Without this patch, the hmac and cipher keys can't be combined in the -same ioctl. - -Signed-off-by: Cristian Stoica -Tested-by: Horia Ioan Geanta Neag ---- - ioctl.c | 14 ++++++-------- - 1 file changed, 6 insertions(+), 8 deletions(-) - -diff --git a/ioctl.c b/ioctl.c -index a0f1db1..c614373 100644 ---- a/ioctl.c -+++ b/ioctl.c -@@ -109,6 +109,8 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) - const char *alg_name = NULL; - const char *hash_name = NULL; - int hmac_mode = 1, stream = 0, aead = 0; -+ uint8_t enckey[CRYPTO_CIPHER_MAX_KEY_LEN]; -+ uint8_t mackey[CRYPTO_HMAC_MAX_KEY_LEN]; - - /* Does the request make sense? */ - if (unlikely(!sop->cipher && !sop->mac)) { -@@ -227,8 +229,6 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) - - /* Set-up crypto transform. */ - if (alg_name) { -- uint8_t keyp[CRYPTO_CIPHER_MAX_KEY_LEN]; -- - if (unlikely(sop->keylen > CRYPTO_CIPHER_MAX_KEY_LEN)) { - ddebug(1, "Setting key failed for %s-%zu.", - alg_name, (size_t)sop->keylen*8); -@@ -236,12 +236,12 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) - goto error_cipher; - } - -- if (unlikely(copy_from_user(keyp, sop->key, sop->keylen))) { -+ if (unlikely(copy_from_user(enckey, sop->key, sop->keylen))) { - ret = -EFAULT; - goto error_cipher; - } - -- ret = cryptodev_cipher_init(&ses_new->cdata, alg_name, keyp, -+ ret = cryptodev_cipher_init(&ses_new->cdata, alg_name, enckey, - sop->keylen, stream, aead); - if (ret < 0) { - ddebug(1, "Failed to load cipher for %s", alg_name); -@@ -251,8 +251,6 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) - } - - if (hash_name && aead == 0) { -- uint8_t keyp[CRYPTO_HMAC_MAX_KEY_LEN]; -- - if (unlikely(sop->mackeylen > CRYPTO_HMAC_MAX_KEY_LEN)) { - ddebug(1, "Setting key failed for %s-%zu.", - hash_name, (size_t)sop->mackeylen*8); -@@ -260,14 +258,14 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) - goto error_hash; - } - -- if (sop->mackey && unlikely(copy_from_user(keyp, sop->mackey, -+ if (sop->mackey && unlikely(copy_from_user(mackey, sop->mackey, - sop->mackeylen))) { - ret = -EFAULT; - goto error_hash; - } - - ret = cryptodev_hash_init(&ses_new->hdata, hash_name, hmac_mode, -- keyp, sop->mackeylen); -+ mackey, sop->mackeylen); - if (ret != 0) { - ddebug(1, "Failed to load hash for %s", hash_name); - ret = -EINVAL; --- -1.7.9.7 - -- cgit v1.2.3-54-g00ecf