diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-17 14:22:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-17 14:22:54 -0400 |
commit | 70477371dc350746d10431d74f0f213a8d59924c (patch) | |
tree | 6271978b6e4ee4b1e6f22775ad7fc0930c09d3ee /net/ipv6/tcp_ipv6.c | |
parent | 09fd671ccb2475436bd5f597f751ca4a7d177aea (diff) | |
parent | 34074205bb9f04b416efb3cbedcd90f418c86200 (diff) |
Merge branch 'linus' of 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 4.6:
API:
- Convert remaining crypto_hash users to shash or ahash, also convert
blkcipher/ablkcipher users to skcipher.
- Remove crypto_hash interface.
- Remove crypto_pcomp interface.
- Add crypto engine for async cipher drivers.
- Add akcipher documentation.
- Add skcipher documentation.
Algorithms:
- Rename crypto/crc32 to avoid name clash with lib/crc32.
- Fix bug in keywrap where we zero the wrong pointer.
Drivers:
- Support T5/M5, T7/M7 SPARC CPUs in n2 hwrng driver.
- Add PIC32 hwrng driver.
- Support BCM6368 in bcm63xx hwrng driver.
- Pack structs for 32-bit compat users in qat.
- Use crypto engine in omap-aes.
- Add support for sama5d2x SoCs in atmel-sha.
- Make atmel-sha available again.
- Make sahara hashing available again.
- Make ccp hashing available again.
- Make sha1-mb available again.
- Add support for multiple devices in ccp.
- Improve DMA performance in caam.
- Add hashing support to rockchip"
* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (116 commits)
crypto: qat - remove redundant arbiter configuration
crypto: ux500 - fix checks of error code returned by devm_ioremap_resource()
crypto: atmel - fix checks of error code returned by devm_ioremap_resource()
crypto: qat - Change the definition of icp_qat_uof_regtype
hwrng: exynos - use __maybe_unused to hide pm functions
crypto: ccp - Add abstraction for device-specific calls
crypto: ccp - CCP versioning support
crypto: ccp - Support for multiple CCPs
crypto: ccp - Remove check for x86 family and model
crypto: ccp - memset request context to zero during import
lib/mpi: use "static inline" instead of "extern inline"
lib/mpi: avoid assembler warning
hwrng: bcm63xx - fix non device tree compatibility
crypto: testmgr - allow rfc3686 aes-ctr variants in fips mode.
crypto: qat - The AE id should be less than the maximal AE number
lib/mpi: Endianness fix
crypto: rockchip - add hash support for crypto engine in rk3288
crypto: xts - fix compile errors
crypto: doc - add skcipher API documentation
crypto: doc - update AEAD AD handling
...
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 5c8c84273028..3447859bdc57 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -66,7 +66,7 @@ | |||
66 | #include <linux/proc_fs.h> | 66 | #include <linux/proc_fs.h> |
67 | #include <linux/seq_file.h> | 67 | #include <linux/seq_file.h> |
68 | 68 | ||
69 | #include <linux/crypto.h> | 69 | #include <crypto/hash.h> |
70 | #include <linux/scatterlist.h> | 70 | #include <linux/scatterlist.h> |
71 | 71 | ||
72 | static void tcp_v6_send_reset(const struct sock *sk, struct sk_buff *skb); | 72 | static void tcp_v6_send_reset(const struct sock *sk, struct sk_buff *skb); |
@@ -541,7 +541,8 @@ static int tcp_v6_md5_hash_pseudoheader(struct tcp_md5sig_pool *hp, | |||
541 | bp->len = cpu_to_be32(nbytes); | 541 | bp->len = cpu_to_be32(nbytes); |
542 | 542 | ||
543 | sg_init_one(&sg, bp, sizeof(*bp)); | 543 | sg_init_one(&sg, bp, sizeof(*bp)); |
544 | return crypto_hash_update(&hp->md5_desc, &sg, sizeof(*bp)); | 544 | ahash_request_set_crypt(hp->md5_req, &sg, NULL, sizeof(*bp)); |
545 | return crypto_ahash_update(hp->md5_req); | ||
545 | } | 546 | } |
546 | 547 | ||
547 | static int tcp_v6_md5_hash_hdr(char *md5_hash, struct tcp_md5sig_key *key, | 548 | static int tcp_v6_md5_hash_hdr(char *md5_hash, struct tcp_md5sig_key *key, |
@@ -549,14 +550,14 @@ static int tcp_v6_md5_hash_hdr(char *md5_hash, struct tcp_md5sig_key *key, | |||
549 | const struct tcphdr *th) | 550 | const struct tcphdr *th) |
550 | { | 551 | { |
551 | struct tcp_md5sig_pool *hp; | 552 | struct tcp_md5sig_pool *hp; |
552 | struct hash_desc *desc; | 553 | struct ahash_request *req; |
553 | 554 | ||
554 | hp = tcp_get_md5sig_pool(); | 555 | hp = tcp_get_md5sig_pool(); |
555 | if (!hp) | 556 | if (!hp) |
556 | goto clear_hash_noput; | 557 | goto clear_hash_noput; |
557 | desc = &hp->md5_desc; | 558 | req = hp->md5_req; |
558 | 559 | ||
559 | if (crypto_hash_init(desc)) | 560 | if (crypto_ahash_init(req)) |
560 | goto clear_hash; | 561 | goto clear_hash; |
561 | if (tcp_v6_md5_hash_pseudoheader(hp, daddr, saddr, th->doff << 2)) | 562 | if (tcp_v6_md5_hash_pseudoheader(hp, daddr, saddr, th->doff << 2)) |
562 | goto clear_hash; | 563 | goto clear_hash; |
@@ -564,7 +565,8 @@ static int tcp_v6_md5_hash_hdr(char *md5_hash, struct tcp_md5sig_key *key, | |||
564 | goto clear_hash; | 565 | goto clear_hash; |
565 | if (tcp_md5_hash_key(hp, key)) | 566 | if (tcp_md5_hash_key(hp, key)) |
566 | goto clear_hash; | 567 | goto clear_hash; |
567 | if (crypto_hash_final(desc, md5_hash)) | 568 | ahash_request_set_crypt(req, NULL, md5_hash, 0); |
569 | if (crypto_ahash_final(req)) | ||
568 | goto clear_hash; | 570 | goto clear_hash; |
569 | 571 | ||
570 | tcp_put_md5sig_pool(); | 572 | tcp_put_md5sig_pool(); |
@@ -584,7 +586,7 @@ static int tcp_v6_md5_hash_skb(char *md5_hash, | |||
584 | { | 586 | { |
585 | const struct in6_addr *saddr, *daddr; | 587 | const struct in6_addr *saddr, *daddr; |
586 | struct tcp_md5sig_pool *hp; | 588 | struct tcp_md5sig_pool *hp; |
587 | struct hash_desc *desc; | 589 | struct ahash_request *req; |
588 | const struct tcphdr *th = tcp_hdr(skb); | 590 | const struct tcphdr *th = tcp_hdr(skb); |
589 | 591 | ||
590 | if (sk) { /* valid for establish/request sockets */ | 592 | if (sk) { /* valid for establish/request sockets */ |
@@ -599,9 +601,9 @@ static int tcp_v6_md5_hash_skb(char *md5_hash, | |||
599 | hp = tcp_get_md5sig_pool(); | 601 | hp = tcp_get_md5sig_pool(); |
600 | if (!hp) | 602 | if (!hp) |
601 | goto clear_hash_noput; | 603 | goto clear_hash_noput; |
602 | desc = &hp->md5_desc; | 604 | req = hp->md5_req; |
603 | 605 | ||
604 | if (crypto_hash_init(desc)) | 606 | if (crypto_ahash_init(req)) |
605 | goto clear_hash; | 607 | goto clear_hash; |
606 | 608 | ||
607 | if (tcp_v6_md5_hash_pseudoheader(hp, daddr, saddr, skb->len)) | 609 | if (tcp_v6_md5_hash_pseudoheader(hp, daddr, saddr, skb->len)) |
@@ -612,7 +614,8 @@ static int tcp_v6_md5_hash_skb(char *md5_hash, | |||
612 | goto clear_hash; | 614 | goto clear_hash; |
613 | if (tcp_md5_hash_key(hp, key)) | 615 | if (tcp_md5_hash_key(hp, key)) |
614 | goto clear_hash; | 616 | goto clear_hash; |
615 | if (crypto_hash_final(desc, md5_hash)) | 617 | ahash_request_set_crypt(req, NULL, md5_hash, 0); |
618 | if (crypto_ahash_final(req)) | ||
616 | goto clear_hash; | 619 | goto clear_hash; |
617 | 620 | ||
618 | tcp_put_md5sig_pool(); | 621 | tcp_put_md5sig_pool(); |