From 62bf74ca2e504e4287a34ccab68297efa16bd481 Mon Sep 17 00:00:00 2001 From: Yongxin Liu Date: Wed, 24 Mar 2021 18:43:23 +0800 Subject: 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 Signed-off-by: Anuj Mittal --- ...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 +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 +--- + 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 ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,12,0)) ++#include ++#include ++MODULE_IMPORT_NS(CRYPTO_INTERNAL); ++#endif + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0)) + #include + #include +-- +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" -- cgit v1.2.3-54-g00ecf