diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-14 12:47:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-14 12:47:01 -0500 |
commit | fee5429e028c414d80d036198db30454cfd91b7a (patch) | |
tree | 485f37a974e4ab85339021c794d1782e2d761c5b /crypto/algif_skcipher.c | |
parent | 83e047c104aa95a8a683d6bd421df1551c17dbd2 (diff) | |
parent | 96692a7305c49845e3cbf5a60cfcb207c5dc4030 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto update from Herbert Xu:
"Here is the crypto update for 3.20:
- Added 192/256-bit key support to aesni GCM.
- Added MIPS OCTEON MD5 support.
- Fixed hwrng starvation and race conditions.
- Added note that memzero_explicit is not a subsitute for memset.
- Added user-space interface for crypto_rng.
- Misc fixes"
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (71 commits)
crypto: tcrypt - do not allocate iv on stack for aead speed tests
crypto: testmgr - limit IV copy length in aead tests
crypto: tcrypt - fix buflen reminder calculation
crypto: testmgr - mark rfc4106(gcm(aes)) as fips_allowed
crypto: caam - fix resource clean-up on error path for caam_jr_init
crypto: caam - pair irq map and dispose in the same function
crypto: ccp - terminate ccp_support array with empty element
crypto: caam - remove unused local variable
crypto: caam - remove dead code
crypto: caam - don't emit ICV check failures to dmesg
hwrng: virtio - drop extra empty line
crypto: replace scatterwalk_sg_next with sg_next
crypto: atmel - Free memory in error path
crypto: doc - remove colons in comments
crypto: seqiv - Ensure that IV size is at least 8 bytes
crypto: cts - Weed out non-CBC algorithms
MAINTAINERS: add linux-crypto to hw random
crypto: cts - Remove bogus use of seqiv
crypto: qat - don't need qat_auth_state struct
crypto: algif_rng - fix sparse non static symbol warning
...
Diffstat (limited to 'crypto/algif_skcipher.c')
-rw-r--r-- | crypto/algif_skcipher.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c index 6fc12c3fc4b9..0c8a1e5ccadf 100644 --- a/crypto/algif_skcipher.c +++ b/crypto/algif_skcipher.c | |||
@@ -330,6 +330,7 @@ static int skcipher_sendmsg(struct kiocb *unused, struct socket *sock, | |||
330 | 330 | ||
331 | sgl = list_entry(ctx->tsgl.prev, struct skcipher_sg_list, list); | 331 | sgl = list_entry(ctx->tsgl.prev, struct skcipher_sg_list, list); |
332 | sg = sgl->sg; | 332 | sg = sgl->sg; |
333 | sg_unmark_end(sg + sgl->cur); | ||
333 | do { | 334 | do { |
334 | i = sgl->cur; | 335 | i = sgl->cur; |
335 | plen = min_t(int, len, PAGE_SIZE); | 336 | plen = min_t(int, len, PAGE_SIZE); |
@@ -355,6 +356,9 @@ static int skcipher_sendmsg(struct kiocb *unused, struct socket *sock, | |||
355 | sgl->cur++; | 356 | sgl->cur++; |
356 | } while (len && sgl->cur < MAX_SGL_ENTS); | 357 | } while (len && sgl->cur < MAX_SGL_ENTS); |
357 | 358 | ||
359 | if (!size) | ||
360 | sg_mark_end(sg + sgl->cur - 1); | ||
361 | |||
358 | ctx->merge = plen & (PAGE_SIZE - 1); | 362 | ctx->merge = plen & (PAGE_SIZE - 1); |
359 | } | 363 | } |
360 | 364 | ||
@@ -401,6 +405,10 @@ static ssize_t skcipher_sendpage(struct socket *sock, struct page *page, | |||
401 | ctx->merge = 0; | 405 | ctx->merge = 0; |
402 | sgl = list_entry(ctx->tsgl.prev, struct skcipher_sg_list, list); | 406 | sgl = list_entry(ctx->tsgl.prev, struct skcipher_sg_list, list); |
403 | 407 | ||
408 | if (sgl->cur) | ||
409 | sg_unmark_end(sgl->sg + sgl->cur - 1); | ||
410 | |||
411 | sg_mark_end(sgl->sg + sgl->cur); | ||
404 | get_page(page); | 412 | get_page(page); |
405 | sg_set_page(sgl->sg + sgl->cur, page, size, offset); | 413 | sg_set_page(sgl->sg + sgl->cur, page, size, offset); |
406 | sgl->cur++; | 414 | sgl->cur++; |