From a828921ccf912224c3f9ae213f6ac2bcda5039fd Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Sun, 24 May 2020 14:17:32 +0200 Subject: cryptodev: add upstream fix to build with Linux v5.5 Signed-off-by: Michael Olbrich --- ...01-Fix-module-loading-with-Linux-v5.0-rc5.patch | 11 +----- .../0002-cryptlib.c-fix-build-on-kernel-v5.5.patch | 39 ++++++++++++++++++++++ patches/cryptodev-linux-1.10/series | 4 +++ 3 files changed, 44 insertions(+), 10 deletions(-) create mode 100644 patches/cryptodev-linux-1.10/0002-cryptlib.c-fix-build-on-kernel-v5.5.patch diff --git a/patches/cryptodev-linux-1.10/0001-Fix-module-loading-with-Linux-v5.0-rc5.patch b/patches/cryptodev-linux-1.10/0001-Fix-module-loading-with-Linux-v5.0-rc5.patch index a201d0290..966c99995 100644 --- a/patches/cryptodev-linux-1.10/0001-Fix-module-loading-with-Linux-v5.0-rc5.patch +++ b/patches/cryptodev-linux-1.10/0001-Fix-module-loading-with-Linux-v5.0-rc5.patch @@ -1,10 +1,3 @@ -Upstream-Status: Backport [https://github.com/cryptodev-linux/cryptodev-linux/commit/f971e0c] - -Backport patch from upstream to fix module cryptodev loading error. - -Signed-off-by: Kai Kang - -From f971e0cd4a0ebe59fb2e8e17240399bf6901b09b Mon Sep 17 00:00:00 2001 From: "Derald D. Woods" Date: Sun, 10 Feb 2019 13:22:19 -0600 Subject: [PATCH] Fix module loading with Linux v5.0-rc5 @@ -27,7 +20,7 @@ Signed-off-by: Derald D. Woods 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cryptlib.c b/cryptlib.c -index 6e66698..4a87037 100644 +index 6e66698f78ed..4a8703788eb8 100644 --- a/cryptlib.c +++ b/cryptlib.c @@ -38,7 +38,9 @@ @@ -54,5 +47,3 @@ index 6e66698..4a87037 100644 struct ablkcipher_alg *alg; alg = &tfm->__crt_alg->cra_ablkcipher; --- -2.20.0 diff --git a/patches/cryptodev-linux-1.10/0002-cryptlib.c-fix-build-on-kernel-v5.5.patch b/patches/cryptodev-linux-1.10/0002-cryptlib.c-fix-build-on-kernel-v5.5.patch new file mode 100644 index 000000000..b7067114f --- /dev/null +++ b/patches/cryptodev-linux-1.10/0002-cryptlib.c-fix-build-on-kernel-v5.5.patch @@ -0,0 +1,39 @@ +From: Andrei Botila +Date: Wed, 27 Nov 2019 09:53:37 +0200 +Subject: [PATCH] cryptlib.c: fix build on kernel v5.5+ + +Starting with kernel v5.5-rc1 ablkcipher and blkcipher are removed and +symmetric key operations will rely solely on skcipher: +commit d63007eb954 ("crypto: ablkcipher - remove deprecated and unused ablkcipher support"). + +When cryptodev will use higher kernel versions > 5.4 will need to use the +skcipher interface instead. + +Signed-off-by: Andrei Botila +--- + cryptlib.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/cryptlib.c b/cryptlib.c +index 4a8703788eb8..e2a4198adb75 100644 +--- a/cryptlib.c ++++ b/cryptlib.c +@@ -159,6 +159,7 @@ int cryptodev_cipher_init(struct cipher_data *out, const char *alg_name, + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)) + tfm = crypto_skcipher_tfm(out->async.s); ++#if (LINUX_VERSION_CODE <= KERNEL_VERSION(5, 4, 0)) + if ((tfm->__crt_alg->cra_type == &crypto_ablkcipher_type) + #if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)) + || (tfm->__crt_alg->cra_type == &crypto_givcipher_type) +@@ -169,7 +170,9 @@ int cryptodev_cipher_init(struct cipher_data *out, const char *alg_name, + alg = &tfm->__crt_alg->cra_ablkcipher; + min_keysize = alg->min_keysize; + max_keysize = alg->max_keysize; +- } else { ++ } else ++#endif ++ { + struct skcipher_alg *alg; + + alg = crypto_skcipher_alg(out->async.s); diff --git a/patches/cryptodev-linux-1.10/series b/patches/cryptodev-linux-1.10/series index fa320b645..a7ecb577b 100644 --- a/patches/cryptodev-linux-1.10/series +++ b/patches/cryptodev-linux-1.10/series @@ -1 +1,5 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 0001-Fix-module-loading-with-Linux-v5.0-rc5.patch +0002-cryptlib.c-fix-build-on-kernel-v5.5.patch +# 1ca74adf7b33d422b42c72283808745c - git-ptx-patches magic -- cgit v1.2.3