Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1315888

[PATCH 19/26] ipsec: Use skcipher and ahash when probing algorithms

From Herbert Xu <herbert@gondor.apana.org.au>
Newsgroups linux.kernel
Subject [PATCH 19/26] ipsec: Use skcipher and ahash when probing algorithms
Date 2016-01-24 14:30 +0100
Message-ID <qUsTV-5op-43@gated-at.bofh.it> (permalink)
References <qUsKd-5k1-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This patch removes the last reference to hash and ablkcipher from
IPsec and replaces them with ahash and skcipher respectively.  For
skcipher there is currently no difference at all, while for ahash
the current code is actually buggy and would prevent asynchronous
algorithms from being discovered.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---

 net/xfrm/xfrm_algo.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c
index f07224d..250e567 100644
--- a/net/xfrm/xfrm_algo.c
+++ b/net/xfrm/xfrm_algo.c
@@ -9,6 +9,8 @@
  * any later version.
  */
 
+#include <crypto/hash.h>
+#include <crypto/skcipher.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/pfkeyv2.h>
@@ -782,14 +784,13 @@ void xfrm_probe_algs(void)
 	BUG_ON(in_softirq());
 
 	for (i = 0; i < aalg_entries(); i++) {
-		status = crypto_has_hash(aalg_list[i].name, 0,
-					 CRYPTO_ALG_ASYNC);
+		status = crypto_has_ahash(aalg_list[i].name, 0, 0);
 		if (aalg_list[i].available != status)
 			aalg_list[i].available = status;
 	}
 
 	for (i = 0; i < ealg_entries(); i++) {
-		status = crypto_has_ablkcipher(ealg_list[i].name, 0, 0);
+		status = crypto_has_skcipher(ealg_list[i].name, 0, 0);
 		if (ealg_list[i].available != status)
 			ealg_list[i].available = status;
 	}

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/26] crypto: Use skcipher and ahash/shash where possible Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:20 +0100
  [PATCH 8/26] cifs: Use skcipher Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:20 +0100
  [PATCH 11/26] f2fs: Use skcipher Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:20 +0100
  [PATCH 13/26] lib80211: Use skcipher and ahash Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:20 +0100
  [PATCH 1/26] block: cryptoloop - Use new skcipher interface Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:20 +0100
    Re: [PATCH 1/26] block: cryptoloop - Use new skcipher interface kbuild test robot <lkp@intel.com> - 2016-01-24 14:40 +0100
      Re: [PATCH 1/26] block: cryptoloop - Use new skcipher interface Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:50 +0100
  [PATCH 16/26] libceph: Use skcipher Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:20 +0100
    Re: [PATCH 16/26] libceph: Use skcipher Ilya Dryomov <idryomov@gmail.com> - 2016-01-25 17:20 +0100
      Re: [PATCH 16/26] libceph: Use skcipher Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-26 12:00 +0100
        Re: [PATCH 16/26] libceph: Use skcipher Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-26 12:40 +0100
        Re: [PATCH 16/26] libceph: Use skcipher Ilya Dryomov <idryomov@gmail.com> - 2016-01-26 12:40 +0100
  [PATCH 14/26] KEYS: Use skcipher Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:20 +0100
  [PATCH 6/26] staging: rtl8192u: Use skcipher and ahash Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:20 +0100
    Re: [PATCH 6/26] staging: rtl8192u: Use skcipher and ahash Greg KH <greg@kroah.com> - 2016-01-24 21:10 +0100
  [PATCH 3/26] staging: rtl8192e: Replace uses of obsolete blkcipher and hash Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:20 +0100
    Re: [PATCH 3/26] staging: rtl8192e: Replace uses of obsolete  blkcipher and hash Greg KH <greg@kroah.com> - 2016-01-24 21:10 +0100
  [PATCH 5/26] orinoco: Use ahash Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:20 +0100
  [PATCH 24/26] nfsd: Use shash Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:30 +0100
  [PATCH 25/26] sctp: Use shash Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:30 +0100
    Re: [PATCH 25/26] sctp: Use shash David Miller <davem@davemloft.net> - 2016-01-25 07:10 +0100
  [PATCH 10/26] ext4: Use skcipher Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:30 +0100
  [PATCH 18/26] rxrpc: Use skcipher Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:30 +0100
  [PATCH 17/26] mac802154: Use skcipher Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:30 +0100
    Re: [PATCH 17/26] mac802154: Use skcipher Stefan Schmidt <stefan@osg.samsung.com> - 2016-01-26 18:00 +0100
  [PATCH 4/26] dm crypt: Use skcipher and ahash Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:30 +0100
    Re: [PATCH 4/26] dm crypt: Use skcipher and ahash kbuild test robot <lkp@intel.com> - 2016-01-24 14:50 +0100
  [PATCH 22/26] iscsi_tcp: Use ahash Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:30 +0100
    Re: [dm-devel] [PATCH 22/26] iscsi_tcp: Use ahash Mike Christie <michaelc@cs.wisc.edu> - 2016-01-25 21:00 +0100
  [PATCH 26/26] tcp: Use ahash Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:30 +0100
    Re: [PATCH 26/26] tcp: Use ahash David Miller <davem@davemloft.net> - 2016-01-25 07:10 +0100
  [PATCH 23/26] iscsi-target: Use shash and ahash Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:30 +0100
  [PATCH 19/26] ipsec: Use skcipher and ahash when probing algorithms Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:30 +0100
    Re: [PATCH 19/26] ipsec: Use skcipher and ahash when probing  algorithms kbuild test robot <lkp@intel.com> - 2016-01-24 14:50 +0100
    Re: [PATCH 19/26] ipsec: Use skcipher and ahash when probing  algorithms David Miller <davem@davemloft.net> - 2016-01-25 07:10 +0100
  [PATCH 20/26] drbd: Use shash and ahash Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:30 +0100
  [PATCH 21/26] nfc: s3fwrn5: Use shash Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:30 +0100
    Re: [PATCH 21/26] nfc: s3fwrn5: Use shash kbuild test robot <lkp@intel.com> - 2016-01-24 15:00 +0100
  [PATCH 15/26] Bluetooth: Use skcipher and hash Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-24 14:30 +0100
    Re: [PATCH 15/26] Bluetooth: Use skcipher and hash Marcel Holtmann <marcel@holtmann.org> - 2016-01-25 07:50 +0100

csiph-web