Whamcloud - gitweb
LU-9859 libcfs: move crypto wrappers to lnet 87/55187/5
authorJames Simmons <jsimmons@infradead.org>
Fri, 24 May 2024 00:07:21 +0000 (20:07 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 5 Jun 2024 04:52:12 +0000 (04:52 +0000)
The crypto wrappers in libcfs is one of the last item that is not
debugging related in the module. We can move it to LNet which
moves us closer to libcfs being just a debugging module.

Test-Parameters: trivial
Change-Id: Idbc058fe2cafc04e4300a576e3368c0961ce98a4
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55187
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 files changed:
libcfs/include/libcfs/Makefile.am
libcfs/libcfs/Makefile.in
libcfs/libcfs/autoMakefile.am
libcfs/libcfs/module.c
lnet/include/lnet/Makefile.am
lnet/include/lnet/lnet_crypto.h [new file with mode: 0644]
lnet/include/uapi/linux/lnet/Makefile.am
lnet/include/uapi/linux/lnet/lnet-crypto.h [moved from libcfs/include/libcfs/libcfs_crypto.h with 70% similarity]
lnet/lnet/Makefile.in
lnet/lnet/adler.c [moved from libcfs/libcfs/linux-crypto-adler.c with 97% similarity]
lnet/lnet/adler.h [moved from libcfs/libcfs/linux-crypto.h with 86% similarity]
lnet/lnet/autoMakefile.am
lnet/lnet/lnet-crypto.c [moved from libcfs/libcfs/linux-crypto.c with 99% similarity]
lnet/lnet/module.c
lustre/include/obd_cksum.h
lustre/llite/crypto.c
lustre/llite/dir.c
lustre/obdclass/obd_sysfs.c
lustre/ptlrpc/gss/gss_internal.h
lustre/ptlrpc/sec.c
lustre/utils/gss/sk_utils.h

index 308de9e..12cd8a0 100644 (file)
@@ -7,7 +7,6 @@ libcfsdir = $(includedir)/libcfs
 
 EXTRA_DIST = \
        libcfs.h \
-       libcfs_crypto.h \
        libcfs_debug.h \
        libcfs_fail.h \
        libcfs_hash.h \
index 7808af2..5193a6c 100644 (file)
@@ -16,8 +16,7 @@ libcfs-linux-objs := $(addprefix linux/,$(libcfs-linux-objs))
 libcfs-crypto-objs := $(addprefix crypto/,$(libcfs-crypto-objs))
 
 libcfs-all-objs := debug.o fail.o module.o tracefile.o \
-                  libcfs_string.o hash.o \
-                  linux-crypto.o linux-crypto-adler.o
+                  libcfs_string.o hash.o
 
 libcfs-objs := $(libcfs-linux-objs) $(libcfs-all-objs)
 @LLCRYPT_TRUE@libcfs-objs += $(libcfs-crypto-objs)
index 633b359..7a14962 100644 (file)
@@ -58,4 +58,4 @@ endif # MODULES
 
 MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ linux/*.o libcfs crypto/*.o
 EXTRA_DIST := $(libcfs-all-objs:%.o=%.c) tracefile.h \
-             fail.c linux-crypto.h
+             fail.c
index e65c1c7..b1cbbe3 100644 (file)
@@ -50,7 +50,6 @@
 #define DEBUG_SUBSYSTEM S_LNET
 
 #include <libcfs/libcfs.h>
-#include <libcfs/libcfs_crypto.h>
 #include <lnet/lib-lnet.h>
 #include <lustre_crypto.h>
 #include "tracefile.h"
@@ -629,7 +628,7 @@ int libcfs_setup(void)
 
        mutex_lock(&libcfs_startup);
        if (libcfs_active)
-               goto out;
+               goto cleanup_lock;
 
        rc = libcfs_debug_init(5 * 1024 * 1024);
        if (rc < 0) {
@@ -642,26 +641,12 @@ int libcfs_setup(void)
                rc = -ENOMEM;
                CERROR("libcfs: failed to start rehash workqueue: rc = %d\n",
                       rc);
-               goto cleanup_debug;
-       }
-
-       rc = cfs_crypto_register();
-       if (rc) {
-               CERROR("cfs_crypto_register: error %d\n", rc);
-               goto cleanup_wq;
+               libcfs_debug_cleanup();
+               goto cleanup_lock;
        }
 
        CDEBUG(D_OTHER, "libcfs setup OK\n");
-out:
        libcfs_active = 1;
-       mutex_unlock(&libcfs_startup);
-       return 0;
-
-cleanup_wq:
-       destroy_workqueue(cfs_rehash_wq);
-       cfs_rehash_wq = NULL;
-cleanup_debug:
-       libcfs_debug_cleanup();
 cleanup_lock:
        mutex_unlock(&libcfs_startup);
        return rc;
@@ -710,8 +695,6 @@ static void __exit libcfs_exit(void)
        if (cfs_rehash_wq)
                destroy_workqueue(cfs_rehash_wq);
 
-       cfs_crypto_unregister();
-
        /* the below message is checked in test-framework.sh check_mem_leak() */
        if (libcfs_kmem_read() != 0)
                CERROR("Portals memory leaked: %lld bytes\n",
index b53c1d5..6baeae1 100644 (file)
@@ -10,6 +10,7 @@ EXTRA_DIST = \
        lib-lnet.h \
        lib-types.h \
        udsp.h \
+       lnet_crypto.h \
        lnet_rdma.h \
        lnet_gds.h \
        lock.h \
diff --git a/lnet/include/lnet/lnet_crypto.h b/lnet/include/lnet/lnet_crypto.h
new file mode 100644 (file)
index 0000000..d718549
--- /dev/null
@@ -0,0 +1,50 @@
+/* GPL HEADER START
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 only,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License version 2 for more details (a copy is included
+ * in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License
+ * version 2 along with this program; If not, see http://www.gnu.org/licenses
+ *
+ * Please  visit http://www.xyratex.com/contact if you need additional
+ * information or have any questions.
+ *
+ * GPL HEADER END
+ */
+
+/* Copyright 2012 Xyratex Technology Limited
+ *
+ * Copyright (c) 2014, Intel Corporation.
+ */
+
+#ifndef _LNET_CRYPTO_H
+#define _LNET_CRYPTO_H
+
+#include <asm/page.h>
+#include <uapi/linux/lnet/lnet-crypto.h>
+
+/* cfs crypto hash descriptor */
+struct ahash_request *
+       cfs_crypto_hash_init(enum cfs_crypto_hash_alg hash_alg,
+                            unsigned char *key, unsigned int key_len);
+int cfs_crypto_hash_update_page(struct ahash_request *req,
+                               struct page *page, unsigned int offset,
+                               unsigned int len);
+int cfs_crypto_hash_update(struct ahash_request *req, const void *buf,
+                          unsigned int buf_len);
+int cfs_crypto_hash_final(struct ahash_request *req,
+                         unsigned char *hash, unsigned int *hash_len);
+int cfs_crypto_register(void);
+void cfs_crypto_unregister(void);
+int cfs_crypto_hash_speed(enum cfs_crypto_hash_alg hash_alg);
+
+#endif
index 2f5849b..206ac45 100644 (file)
@@ -13,6 +13,7 @@ lnetinclude_HEADERS = \
        libcfs_debug.h \
        libcfs_ioctl.h \
        lnetctl.h \
+       lnet-crypto.h \
        lnet-dlc.h \
        lnetst.h \
        lnet-idl.h \
@@ -25,6 +26,7 @@ EXTRA_DIST = \
        libcfs_debug.h \
        libcfs_ioctl.h \
        lnetctl.h \
+       lnet-crypto.h \
        lnet-dlc.h \
        lnetst.h \
        lnet-idl.h \
similarity index 70%
rename from libcfs/include/libcfs/libcfs_crypto.h
rename to lnet/include/uapi/linux/lnet/lnet-crypto.h
index f271676..6d0cf47 100644 (file)
  * GPL HEADER END
  */
 
-/*
- * Copyright 2012 Xyratex Technology Limited
+/* Copyright 2012 Xyratex Technology Limited
  *
  * Copyright (c) 2014, Intel Corporation.
  */
 
-#ifndef _LIBCFS_CRYPTO_H
-#define _LIBCFS_CRYPTO_H
+#ifndef _UAPI_LNET_CRYPTO_H
+#define _UAPI_LNET_CRYPTO_H
+
+#include <linux/types.h>
+#include <linux/string.h>
 
 struct cfs_crypto_hash_type {
-       char            *cht_name;      /**< hash algorithm name, equal to
-                                        * format name for crypto api */
-       unsigned int    cht_key;        /**< init key by default (vaild for
-                                        * 4 bytes context like crc32, adler */
-       unsigned int    cht_size;       /**< hash digest size */
+       char            *cht_name;      /* hash algorithm name, equal to
+                                        * format name for crypto api
+                                        */
+       unsigned int    cht_key;        /* init key by default (vaild for
+                                        * 4 bytes context like crc32, adler
+                                        */
+       unsigned int    cht_size;       /* hash digest size */
 };
 
 struct cfs_crypto_crypt_type {
-       char           *cct_name;         /**< crypto algorithm name, equal to
-                                          * format name for crypto api */
-       unsigned int    cct_size;         /**< crypto key size */
+       char           *cct_name;         /* crypto algorithm name, equal to
+                                          * format name for crypto api
+                                          */
+       unsigned int    cct_size;         /* crypto key size */
 };
 
 enum cfs_crypto_hash_alg {
@@ -142,8 +147,8 @@ extern int cfs_crypto_hash_speeds[CFS_HASH_ALG_MAX];
  *
  * Hash information includes algorithm name, initial seed, hash size.
  *
- * \retval             cfs_crypto_hash_type for valid ID (CFS_HASH_ALG_*)
- * \retval             NULL for unknown algorithm identifier
+ * RETURN              cfs_crypto_hash_type for valid ID (CFS_HASH_ALG_*)
+ *                     NULL for unknown algorithm identifier
  */
 static inline const struct
 cfs_crypto_hash_type *cfs_crypto_hash_type(enum cfs_crypto_hash_alg hash_alg)
@@ -152,7 +157,7 @@ cfs_crypto_hash_type *cfs_crypto_hash_type(enum cfs_crypto_hash_alg hash_alg)
 
        if (hash_alg < CFS_HASH_ALG_MAX) {
                ht = &hash_types[hash_alg];
-               if (ht->cht_name != NULL)
+               if (ht->cht_name)
                        return ht;
        }
        return NULL;
@@ -161,10 +166,10 @@ cfs_crypto_hash_type *cfs_crypto_hash_type(enum cfs_crypto_hash_alg hash_alg)
 /**
  * Return hash name for hash algorithm identifier
  *
- * \param[in] hash_alg hash alrgorithm id (CFS_HASH_ALG_*)
+ * @hash_alg           hash alrgorithm id (CFS_HASH_ALG_*)
  *
- * \retval             string name of known hash algorithm
- * \retval             "unknown" if hash algorithm is unknown
+ * RETURN              string name of known hash algorithm
+ *                     "unknown" if hash algorithm is unknown
  */
 static inline const
 char *cfs_crypto_hash_name(enum cfs_crypto_hash_alg hash_alg)
@@ -181,10 +186,10 @@ char *cfs_crypto_hash_name(enum cfs_crypto_hash_alg hash_alg)
 /**
  * Return digest size for hash algorithm type
  *
- * \param[in] hash_alg hash alrgorithm id (CFS_HASH_ALG_*)
+ * @hash_alg           hash alrgorithm id (CFS_HASH_ALG_*)
  *
- * \retval             hash algorithm digest size in bytes
- * \retval             0 if hash algorithm type is unknown
+ * RETURN              hash algorithm digest size in bytes
+ *                     0 if hash algorithm type is unknown
  */
 static inline
 unsigned int cfs_crypto_hash_digestsize(enum cfs_crypto_hash_alg hash_alg)
@@ -192,7 +197,7 @@ unsigned int cfs_crypto_hash_digestsize(enum cfs_crypto_hash_alg hash_alg)
        const struct cfs_crypto_hash_type *ht;
 
        ht = cfs_crypto_hash_type(hash_alg);
-       if (ht != NULL)
+       if (ht)
                return ht->cht_size;
 
        return 0;
@@ -201,8 +206,8 @@ unsigned int cfs_crypto_hash_digestsize(enum cfs_crypto_hash_alg hash_alg)
 /**
  * Find hash algorithm ID for the specified algorithm name
  *
- * \retval             hash algorithm ID for valid ID (CFS_HASH_ALG_*)
- * \retval             CFS_HASH_ALG_UNKNOWN for unknown algorithm name
+ * RETURN              hash algorithm ID for valid ID (CFS_HASH_ALG_*)
+ *                     CFS_HASH_ALG_UNKNOWN for unknown algorithm name
  */
 static inline unsigned char cfs_crypto_hash_alg(const char *algname)
 {
@@ -220,8 +225,8 @@ static inline unsigned char cfs_crypto_hash_alg(const char *algname)
  *
  * Crypt information includes algorithm name, key size.
  *
- * \retval             cfs_crypto_crupt_type for valid ID (CFS_CRYPT_ALG_*)
- * \retval             NULL for unknown algorithm identifier
+ * RETURN              cfs_crypto_crupt_type for valid ID (CFS_CRYPT_ALG_*)
+ *                     NULL for unknown algorithm identifier
  */
 static inline const struct
 cfs_crypto_crypt_type *cfs_crypto_crypt_type(
@@ -231,7 +236,7 @@ cfs_crypto_crypt_type *cfs_crypto_crypt_type(
 
        if (crypt_alg < CFS_CRYPT_ALG_MAX) {
                ct = &crypt_types[crypt_alg];
-               if (ct->cct_name != NULL)
+               if (ct->cct_name)
                        return ct;
        }
        return NULL;
@@ -240,10 +245,10 @@ cfs_crypto_crypt_type *cfs_crypto_crypt_type(
 /**
  * Return crypt name for crypt algorithm identifier
  *
- * \param[in] crypt_alg        crypt alrgorithm id (CFS_CRYPT_ALG_*)
+ * @crypt_alg          crypt alrgorithm id (CFS_CRYPT_ALG_*)
  *
- * \retval             string name of known crypt algorithm
- * \retval             "unknown" if hash algorithm is unknown
+ * RETURN              string name of known crypt algorithm
+ *                     "unknown" if hash algorithm is unknown
  */
 static inline const
 char *cfs_crypto_crypt_name(enum cfs_crypto_crypt_alg crypt_alg)
@@ -261,10 +266,10 @@ char *cfs_crypto_crypt_name(enum cfs_crypto_crypt_alg crypt_alg)
 /**
  * Return key size for crypto algorithm type
  *
- * \param[in] crypt_alg        crypt alrgorithm id (CFS_CRYPT_ALG_*)
+ * @crypt_alg          crypt alrgorithm id (CFS_CRYPT_ALG_*)
  *
- * \retval             crypt algorithm key size in bytes
- * \retval             0 if crypt algorithm type is unknown
+ * RETURN              crypt algorithm key size in bytes
+ *                     0 if crypt algorithm type is unknown
  */
 static inline
 unsigned int cfs_crypto_crypt_keysize(enum cfs_crypto_crypt_alg crypt_alg)
@@ -272,7 +277,7 @@ unsigned int cfs_crypto_crypt_keysize(enum cfs_crypto_crypt_alg crypt_alg)
        const struct cfs_crypto_crypt_type *ct;
 
        ct = cfs_crypto_crypt_type(crypt_alg);
-       if (ct != NULL)
+       if (ct)
                return ct->cct_size;
 
        return 0;
@@ -281,8 +286,8 @@ unsigned int cfs_crypto_crypt_keysize(enum cfs_crypto_crypt_alg crypt_alg)
 /**
  * Find crypto algorithm ID for the specified algorithm name
  *
- * \retval             crypto algorithm ID for valid ID (CFS_CRYPT_ALG_*)
- * \retval             CFS_CRYPT_ALG_UNKNOWN for unknown algorithm name
+ * RETURN              crypto algorithm ID for valid ID (CFS_CRYPT_ALG_*)
+ *                     CFS_CRYPT_ALG_UNKNOWN for unknown algorithm name
  */
 static inline unsigned char cfs_crypto_crypt_alg(const char *algname)
 {
@@ -300,20 +305,4 @@ int cfs_crypto_hash_digest(enum cfs_crypto_hash_alg hash_alg,
                           unsigned char *key, unsigned int key_len,
                           unsigned char *hash, unsigned int *hash_len);
 
-/* cfs crypto hash descriptor */
-struct page;
-
-struct ahash_request *
-       cfs_crypto_hash_init(enum cfs_crypto_hash_alg hash_alg,
-                            unsigned char *key, unsigned int key_len);
-int cfs_crypto_hash_update_page(struct ahash_request *req,
-                               struct page *page, unsigned int offset,
-                               unsigned int len);
-int cfs_crypto_hash_update(struct ahash_request *req, const void *buf,
-                          unsigned int buf_len);
-int cfs_crypto_hash_final(struct ahash_request *req,
-                         unsigned char *hash, unsigned int *hash_len);
-int cfs_crypto_register(void);
-void cfs_crypto_unregister(void);
-int cfs_crypto_hash_speed(enum cfs_crypto_hash_alg hash_alg);
-#endif
+#endif /* _UAPI_LNET_CRYPT_H_ */
index ec963c4..ee78177 100644 (file)
@@ -11,6 +11,7 @@ lnet-objs := api-ni.o config.o nidstrings.o lnet_rdma.o lock.o
 lnet-objs += lib-me.o lib-msg.o lib-md.o lib-ptl.o
 lnet-objs += lib-socket.o lib-move.o module.o lo.o
 lnet-objs += router.o lnet_debugfs.o acceptor.o peer.o net_fault.o udsp.o
+lnet-objs += lnet-crypto.o adler.o
 lnet-objs += $(lnet-objs-y)
 
 CFLAGS_lnet_rdma.o += -I @GDS_PATH@ -I@CUDA_PATH@
similarity index 97%
rename from libcfs/libcfs/linux-crypto-adler.c
rename to lnet/lnet/adler.c
index 6f19bca..eaa4061 100644 (file)
  * GPL HEADER END
  */
 
-/*
- * Copyright 2012 Xyratex Technology Limited
- */
-
-/*
+/* Copyright 2012 Xyratex Technology Limited
+ *
  * This is crypto api shash wrappers to zlib_adler32.
  */
 
 #include <linux/module.h>
 #include <linux/zutil.h>
 #include <crypto/internal/hash.h>
-#include "linux-crypto.h"
+#include "adler.h"
 
 #define CHKSUM_BLOCK_SIZE      1
 #define CHKSUM_DIGEST_SIZE     4
similarity index 86%
rename from libcfs/libcfs/linux-crypto.h
rename to lnet/lnet/adler.h
index 05610db..326b59c 100644 (file)
  * GPL HEADER END
  */
 
-/*
- * Copyright 2012 Xyratex Technology Limited
- */
-
-/**
- * Linux crypto hash specific functions.
+/* Copyright 2012 Xyratex Technology Limited
+ *
+ * Alder crypto hash specific functions.
  */
 
-/**
- * Functions for start/stop shash adler32 algorithm.
- */
+/* Functions for start/stop shash adler32 algorithm. */
 int cfs_crypto_adler32_register(void);
 void cfs_crypto_adler32_unregister(void);
index daf8386..026ff7f 100644 (file)
@@ -12,6 +12,6 @@ endif # LINUX
 
 endif # MODULES
 
-EXTRA_DIST := $(lnet-objs:%.o=%.c) lib-cpt.c
+EXTRA_DIST := $(lnet-objs:%.o=%.c) lib-cpt.c adler.h
 
 MOSTLYCLEANFILES = @MOSTLYCLEANFILES@ lnet
similarity index 99%
rename from libcfs/libcfs/linux-crypto.c
rename to lnet/lnet/lnet-crypto.c
index e210b80..ed75752 100644 (file)
@@ -21,8 +21,7 @@
  * GPL HEADER END
  */
 
-/*
- * Copyright 2012 Xyratex Technology Limited
+/* Copyright 2012 Xyratex Technology Limited
  *
  * Copyright (c) 2012, 2014, Intel Corporation.
  */
@@ -31,8 +30,8 @@
 #include <linux/scatterlist.h>
 #include <linux/pagemap.h>
 #include <libcfs/libcfs.h>
-#include <libcfs/libcfs_crypto.h>
-#include "linux-crypto.h"
+#include <lnet/lnet_crypto.h>
+#include "adler.h"
 
 #ifndef HAVE_CRYPTO_HASH_HELPERS
 static inline const char *crypto_ahash_alg_name(struct crypto_ahash *tfm)
index 6046362..80452b2 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <linux/miscdevice.h>
 #include <lnet/lib-lnet.h>
+#include <lnet/lnet_crypto.h>
 #include <uapi/linux/lnet/lnet-dlc.h>
 #include <uapi/linux/lustre/lustre_ver.h>
 
@@ -423,9 +424,17 @@ static int __init lnet_init(void)
                RETURN(rc);
        }
 
+       rc = cfs_crypto_register();
+       if (rc) {
+               CERROR("cfs_crypto_register: rc = %d\n", rc);
+               cfs_cpu_fini();
+               RETURN(rc);
+       }
+
        rc = lnet_lib_init();
        if (rc != 0) {
                CERROR("lnet_lib_init: rc = %d\n", rc);
+               cfs_crypto_unregister();
                cfs_cpu_fini();
                RETURN(rc);
        }
@@ -433,6 +442,8 @@ static int __init lnet_init(void)
        rc = misc_register(&lnet_dev);
        if (rc) {
                CERROR("misc_register: rc = %d\n", rc);
+               lnet_lib_exit();
+               cfs_crypto_unregister();
                cfs_cpu_fini();
                RETURN(rc);
        }
@@ -456,6 +467,7 @@ static void __exit lnet_exit(void)
 
        lnet_router_exit();
        lnet_lib_exit();
+       cfs_crypto_unregister();
        cfs_cpu_fini();
 }
 
index 1f9f0b1..13080d3 100644 (file)
@@ -32,7 +32,7 @@
 #ifndef __OBD_CKSUM
 #define __OBD_CKSUM
 #include <libcfs/libcfs.h>
-#include <libcfs/libcfs_crypto.h>
+#include <lnet/lnet_crypto.h>
 #include <uapi/linux/lustre/lustre_idl.h>
 
 int obd_t10_cksum_speed(const char *obd_name,
index 728fa81..2a92b07 100644 (file)
@@ -29,7 +29,6 @@
 #include "llite_internal.h"
 
 #ifdef HAVE_LUSTRE_CRYPTO
-#include <libcfs/libcfs_crypto.h>
 
 static int ll_get_context(struct inode *inode, void *ctx, size_t len)
 {
index 1fd6e7d..bff67ce 100644 (file)
@@ -56,7 +56,6 @@
 #include <lustre_kernelcomm.h>
 #include <lustre_swab.h>
 #include <lustre_quota.h>
-#include <libcfs/libcfs_crypto.h>
 
 #include "llite_internal.h"
 
index 2da1aa7..029fbfd 100644 (file)
@@ -62,7 +62,7 @@
 #include <linux/kobject.h>
 
 #include <libcfs/libcfs.h>
-#include <libcfs/libcfs_crypto.h>
+#include <lnet/lnet_crypto.h>
 #include <obd_support.h>
 #include <obd_class.h>
 #include <lprocfs_status.h>
index baa6e77..e71e918 100644 (file)
@@ -12,7 +12,7 @@
 #define __PTLRPC_GSS_GSS_INTERNAL_H_
 
 #include <crypto/hash.h>
-#include <libcfs/libcfs_crypto.h>
+#include <lnet/lnet_crypto.h>
 #include <lustre_sec.h>
 #include <upcall_cache.h>
 
index 69a74f9..641327c 100644 (file)
@@ -41,6 +41,7 @@
 #include <linux/key.h>
 
 #include <libcfs/libcfs.h>
+#include <lnet/lnet_crypto.h>
 #include <obd.h>
 #include <obd_class.h>
 #include <obd_support.h>
@@ -48,7 +49,6 @@
 #include <lustre_import.h>
 #include <lustre_dlm.h>
 #include <lustre_sec.h>
-#include <libcfs/libcfs_crypto.h>
 
 #include "ptlrpc_internal.h"
 
index e54d6c4..3889de9 100644 (file)
@@ -48,7 +48,7 @@
 #include <openssl/err.h>
 #include <sys/types.h>
 
-#include <libcfs/libcfs_crypto.h>
+#include <linux/lnet/lnet-crypto.h>
 #include "lsupport.h"
 
 #ifndef ARRAY_SIZE