summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYongxin Liu <yongxin.liu@windriver.com>2021-03-24 18:43:23 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2021-03-26 14:37:06 +0800
commit62bf74ca2e504e4287a34ccab68297efa16bd481 (patch)
tree09f0fd628ec4d1e0ec6537e21d237e5872f60dc3
parent7aa65c0f2ddbb4da3d22fad32f849f34d9edfcb7 (diff)
downloadmeta-intel-qat-62bf74ca2e504e4287a34ccab68297efa16bd481.tar.gz
qat17: use namespace CRYPTO_INTERNAL in kernel v5.12
In kernel commit commit 0eb76ba29d16 ("crypto: remove cipher routines from public crypto API") in v5.12-rc1, some cipher routines are moved to include/crypto/internal/cipher.h, and a new namespace CRYPTO_INTERNAL is used to export some crypto symbols. Add qat17_4.7.0-00006-qat17-use-namespace-CRYPTO_INTERNAL.patch to accommodate this change. Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--recipes-extended/qat/files/qat17_4.7.0-00006-qat17-use-namespace-CRYPTO_INTERNAL.patch47
-rw-r--r--recipes-extended/qat/qat17_4.7.0-00006.bb1
2 files changed, 48 insertions, 0 deletions
diff --git a/recipes-extended/qat/files/qat17_4.7.0-00006-qat17-use-namespace-CRYPTO_INTERNAL.patch b/recipes-extended/qat/files/qat17_4.7.0-00006-qat17-use-namespace-CRYPTO_INTERNAL.patch
new file mode 100644
index 0000000..a4fad3c
--- /dev/null
+++ b/recipes-extended/qat/files/qat17_4.7.0-00006-qat17-use-namespace-CRYPTO_INTERNAL.patch
@@ -0,0 +1,47 @@
1From 3b45583612822851a0841cff8381d8795c831a23 Mon Sep 17 00:00:00 2001
2From: Yongxin Liu <yongxin.liu@windriver.com>
3Date: Tue, 23 Mar 2021 09:31:25 +0000
4Subject: [PATCH] qat17: use namespace CRYPTO_INTERNAL
5
6Due to kernel commit 0eb76ba29d16 ("crypto: remove cipher routines from
7public crypto API") in v5.12-rc1, some crypto APIs are exported into a new
8namespace CRYPTO_INTERNAL.
9
10Upstream-Status: Inappropriate [Code released in tarball form only]
11
12Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com>
13---
14 quickassist/lookaside/access_layer/src/linux/icp_qa_module.c | 3 +++
15 .../osal/src/linux/kernel_space/OsalCryptoInterface.c | 5 +++++
16 2 files changed, 8 insertions(+)
17
18diff --git a/quickassist/lookaside/access_layer/src/linux/icp_qa_module.c b/quickassist/lookaside/access_layer/src/linux/icp_qa_module.c
19index c9c6946..a9dd704 100644
20--- a/quickassist/lookaside/access_layer/src/linux/icp_qa_module.c
21+++ b/quickassist/lookaside/access_layer/src/linux/icp_qa_module.c
22@@ -120,3 +120,6 @@ module_exit(kapi_mod_exit);
23 MODULE_DESCRIPTION("Intel(R) Quickassist Technology Acceleration Driver");
24 MODULE_AUTHOR("Intel");
25 MODULE_LICENSE("Dual BSD/GPL");
26+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,12,0))
27+MODULE_IMPORT_NS(CRYPTO_INTERNAL);
28+#endif
29diff --git a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
30index 483aef2..a150a86 100644
31--- a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
32+++ b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
33@@ -66,6 +66,11 @@
34
35 #include "Osal.h"
36 #include <linux/crypto.h>
37+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,12,0))
38+#include <crypto/internal/cipher.h>
39+#include <linux/module.h>
40+MODULE_IMPORT_NS(CRYPTO_INTERNAL);
41+#endif
42 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
43 #include <crypto/sha1.h>
44 #include <crypto/sha2.h>
45--
462.29.2
47
diff --git a/recipes-extended/qat/qat17_4.7.0-00006.bb b/recipes-extended/qat/qat17_4.7.0-00006.bb
index 4c2df62..e9fb85d 100644
--- a/recipes-extended/qat/qat17_4.7.0-00006.bb
+++ b/recipes-extended/qat/qat17_4.7.0-00006.bb
@@ -28,6 +28,7 @@ SRC_URI = "https://01.org/sites/default/files/downloads/qat1.7.l.4.7.0-00006.tar
28 file://qat17_4.7.0-00006-overwrite-KBUILD_BUILTIN-in-kernel-s-Makefile.patch \ 28 file://qat17_4.7.0-00006-overwrite-KBUILD_BUILTIN-in-kernel-s-Makefile.patch \
29 file://qat17_4.7.0-00006-crypto-qat-Silence-smp_processor_id-warning.patch \ 29 file://qat17_4.7.0-00006-crypto-qat-Silence-smp_processor_id-warning.patch \
30 file://qat17_4.7.0-00006-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch \ 30 file://qat17_4.7.0-00006-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch \
31 file://qat17_4.7.0-00006-qat17-use-namespace-CRYPTO_INTERNAL.patch \
31 " 32 "
32 33
33do_patch[depends] += "virtual/kernel:do_shared_workdir" 34do_patch[depends] += "virtual/kernel:do_shared_workdir"