1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
From 6a1fa62ffa4acd6e8e4d4f648e19363a2ed5ef74 Mon Sep 17 00:00:00 2001
From: Yongxin Liu <yongxin.liu@windriver.com>
Date: Tue, 23 Mar 2021 09:31:25 +0000
Subject: [PATCH 11/11] qat17: use namespace CRYPTO_INTERNAL
Due to kernel commit 0eb76ba29d16 ("crypto: remove cipher routines from
public crypto API") in v5.12-rc1, some crypto APIs are exported into a new
namespace CRYPTO_INTERNAL.
Upstream-Status: Inappropriate [Code released in tarball form only]
Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com>
---
quickassist/lookaside/access_layer/src/linux/icp_qa_module.c | 3 +++
quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c | 5 +++++
.../osal/src/linux/kernel_space/OsalCryptoInterface.c | 5 +++++
3 files changed, 13 insertions(+)
diff --git a/quickassist/lookaside/access_layer/src/linux/icp_qa_module.c b/quickassist/lookaside/access_layer/src/linux/icp_qa_module.c
index db51add84592..209b3054aa8c 100644
--- a/quickassist/lookaside/access_layer/src/linux/icp_qa_module.c
+++ b/quickassist/lookaside/access_layer/src/linux/icp_qa_module.c
@@ -120,3 +120,6 @@ module_exit(kapi_mod_exit);
MODULE_DESCRIPTION("Intel(R) Quickassist Technology Acceleration Driver");
MODULE_AUTHOR("Intel");
MODULE_LICENSE("Dual BSD/GPL");
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,12,0))
+MODULE_IMPORT_NS(CRYPTO_INTERNAL);
+#endif
diff --git a/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c b/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c
index 23249de3db39..0e61954c0150 100644
--- a/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c
+++ b/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c
@@ -8,7 +8,12 @@
#include <crypto/internal/aead.h>
#include <crypto/internal/skcipher.h>
#include <crypto/aes.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+#include <crypto/sha1.h>
+#include <crypto/sha2.h>
+#else
#include <crypto/sha.h>
+#endif
#include <crypto/hash.h>
#include <crypto/algapi.h>
#include <crypto/authenc.h>
diff --git a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
index ec536607989a..9d62bb8749d5 100644
--- a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
+++ b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
@@ -76,6 +76,11 @@
#endif /* end of 5.11.0, 2.6.29 checks */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
#include <crypto/internal/hash.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,12,0))
+#include <crypto/internal/cipher.h>
+#include <linux/module.h>
+MODULE_IMPORT_NS(CRYPTO_INTERNAL);
+#endif
#define OSAL_MAX_SHASH_DECSIZE 512
--
2.29.2
|