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 <[email protected]>
---
 ...00006-qat17-use-namespace-CRYPTO_INTERNAL.patch | 47 ++++++++++++++++++++++
 recipes-extended/qat/qat17_4.7.0-00006.bb          |  1 +
 2 files changed, 48 insertions(+)
 create mode 100644 
recipes-extended/qat/files/qat17_4.7.0-00006-qat17-use-namespace-CRYPTO_INTERNAL.patch

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 @@
+From 3b45583612822851a0841cff8381d8795c831a23 Mon Sep 17 00:00:00 2001
+From: Yongxin Liu <[email protected]>
+Date: Tue, 23 Mar 2021 09:31:25 +0000
+Subject: [PATCH] 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 <[email protected]>
+---
+ quickassist/lookaside/access_layer/src/linux/icp_qa_module.c | 3 +++
+ .../osal/src/linux/kernel_space/OsalCryptoInterface.c        | 5 +++++
+ 2 files changed, 8 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 c9c6946..a9dd704 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/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c 
b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
+index 483aef2..a150a86 100644
+--- a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
++++ b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
+@@ -66,6 +66,11 @@
+ 
+ #include "Osal.h"
+ #include <linux/crypto.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
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+ #include <crypto/sha1.h>
+ #include <crypto/sha2.h>
+-- 
+2.29.2
+
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
            
file://qat17_4.7.0-00006-overwrite-KBUILD_BUILTIN-in-kernel-s-Makefile.patch \
            
file://qat17_4.7.0-00006-crypto-qat-Silence-smp_processor_id-warning.patch \
            
file://qat17_4.7.0-00006-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch
 \
+           file://qat17_4.7.0-00006-qat17-use-namespace-CRYPTO_INTERNAL.patch \
           "
 
 do_patch[depends] += "virtual/kernel:do_shared_workdir"
-- 
2.14.5

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6962): 
https://lists.yoctoproject.org/g/meta-intel/message/6962
Mute This Topic: https://lists.yoctoproject.org/mt/81573532/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-intel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to