summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2015-06-15 07:26:47 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-06-15 07:28:19 +0200
commit8becc9953f7f8b7980106ced51ec8ed67ccc09f9 (patch)
treeb181b3caa976d4d1409fb30d92bb451b1139ab3c
parent0f792db0c4f74e99a1a9ccc6694abf60c4b41a5a (diff)
parent491fba88036f54220ebdbb2d0fc54e17f68c6d7e (diff)
downloadlinux-crypto-8becc9953f7f8b7980106ced51ec8ed67ccc09f9.tar.gz
linux-crypto-8becc9953f7f8b7980106ced51ec8ed67ccc09f9.zip
Merge remote-tracking branch 'origin/drm-intel-next-queued' into drm-intel-next-queued
Pull in patches Jani applied while I was on vacation. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
-rw-r--r--crypto/Kconfig9
-rw-r--r--crypto/algif_aead.c9
2 files changed, 4 insertions, 14 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig
index 8aaf298a..362905e7 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -1512,15 +1512,6 @@ config CRYPTO_USER_API_RNG
This option enables the user-spaces interface for random
number generator algorithms.
-config CRYPTO_USER_API_AEAD
- tristate "User-space interface for AEAD cipher algorithms"
- depends on NET
- select CRYPTO_AEAD
- select CRYPTO_USER_API
- help
- This option enables the user-spaces interface for AEAD
- cipher algorithms.
-
config CRYPTO_HASH_INFO
bool
diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c
index 00a6fe16..69abada2 100644
--- a/crypto/algif_aead.c
+++ b/crypto/algif_aead.c
@@ -33,7 +33,7 @@ struct aead_ctx {
/*
* RSGL_MAX_ENTRIES is an artificial limit where user space at maximum
* can cause the kernel to allocate RSGL_MAX_ENTRIES * ALG_MAX_PAGES
- * bytes
+ * pages
*/
#define RSGL_MAX_ENTRIES ALG_MAX_PAGES
struct af_alg_sgl rsgl[RSGL_MAX_ENTRIES];
@@ -435,11 +435,10 @@ static int aead_recvmsg(struct socket *sock, struct msghdr *msg, size_t ignored,
if (err < 0)
goto unlock;
usedpages += err;
- /* chain the new scatterlist with initial list */
+ /* chain the new scatterlist with previous one */
if (cnt)
- scatterwalk_crypto_chain(ctx->rsgl[0].sg,
- ctx->rsgl[cnt].sg, 1,
- sg_nents(ctx->rsgl[cnt-1].sg));
+ af_alg_link_sg(&ctx->rsgl[cnt-1], &ctx->rsgl[cnt]);
+
/* we do not need more iovecs as we have sufficient memory */
if (outlen <= usedpages)
break;