From: Stijn Segers Date: Thu, 24 Dec 2020 13:06:17 +0000 (+0100) Subject: cryptodev-linux: bump to 1.11, fix build against kernel 5.10. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=59b5c52a6b77e3b6edd45f2526d55efbd0a04043;p=openwrt%2Fstaging%2Fblocktrron.git cryptodev-linux: bump to 1.11, fix build against kernel 5.10. This patch bumps cryptodev-linux to the latest stable release (1.11) and fixes compilation against the next LTS (and likely OpenWrt) kernel 5.10. Signed-off-by: Stijn Segers --- diff --git a/package/kernel/cryptodev-linux/Makefile b/package/kernel/cryptodev-linux/Makefile index 9bea63ebd1..85065e4eeb 100644 --- a/package/kernel/cryptodev-linux/Makefile +++ b/package/kernel/cryptodev-linux/Makefile @@ -10,12 +10,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=cryptodev-linux -PKG_VERSION:=1.10 -PKG_RELEASE:=2 +PKG_VERSION:=1.11 +PKG_RELEASE:=1 PKG_SOURCE_URL:=https://codeload.github.com/$(PKG_NAME)/$(PKG_NAME)/tar.gz/$(PKG_NAME)-$(PKG_VERSION)? PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=833ab7c5c88d2b700a7c702a151254c089a3058886a63cc7d12630e364b8ea83 +PKG_HASH:=d71fd8dafc40147586f5bc6acca8fce5088d9c576d1142fe5aeb7b0813186a11 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING diff --git a/package/kernel/cryptodev-linux/patches/010-Fix-module-loading-with-Linux-v5.0-rc5.patch b/package/kernel/cryptodev-linux/patches/010-Fix-module-loading-with-Linux-v5.0-rc5.patch deleted file mode 100644 index 5909f6dfb3..0000000000 --- a/package/kernel/cryptodev-linux/patches/010-Fix-module-loading-with-Linux-v5.0-rc5.patch +++ /dev/null @@ -1,50 +0,0 @@ -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 - -This commit fixes this module load error: -[...] -[ 29.112091] cryptodev: loading out-of-tree module taints kernel. -[ 29.128906] cryptodev: Unknown symbol crypto_givcipher_type (err -2) -[ 29.188842] cryptodev: Unknown symbol crypto_givcipher_type (err -2) -modprobe: can't load module cryptodev (extra/cryptodev.ko): unknown symbol in module, or unknown parameter -[...] - -Upstream Linux support for unused GIVCIPHER, and others, was dropped here: - -c79b411eaa72 (crypto: skcipher - remove remnants of internal IV generators) - -Signed-off-by: Derald D. Woods ---- - cryptlib.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/cryptlib.c b/cryptlib.c -index 6e66698..4a87037 100644 ---- a/cryptlib.c -+++ b/cryptlib.c -@@ -38,7 +38,9 @@ - #include "cryptodev_int.h" - #include "cipherapi.h" - -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)) - extern const struct crypto_type crypto_givcipher_type; -+#endif - - static void cryptodev_complete(struct crypto_async_request *req, int err) - { -@@ -157,8 +159,11 @@ 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 ((tfm->__crt_alg->cra_type == &crypto_ablkcipher_type) || -- (tfm->__crt_alg->cra_type == &crypto_givcipher_type)) { -+ 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) -+#endif -+ ) { - struct ablkcipher_alg *alg; - - alg = &tfm->__crt_alg->cra_ablkcipher; diff --git a/package/kernel/cryptodev-linux/patches/010-fix-build-for-kernel-v5.9-rc1.patch b/package/kernel/cryptodev-linux/patches/010-fix-build-for-kernel-v5.9-rc1.patch new file mode 100644 index 0000000000..09768a1f3a --- /dev/null +++ b/package/kernel/cryptodev-linux/patches/010-fix-build-for-kernel-v5.9-rc1.patch @@ -0,0 +1,32 @@ +From 2f5e08aebf9229599aae7f25db752f74221cd71d Mon Sep 17 00:00:00 2001 +From: Joan Bruguera +Date: Fri, 14 Aug 2020 00:13:38 +0200 +Subject: [PATCH] Fix build for Linux 5.9-rc1 + +See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=64019a2e467a288a16b65ab55ddcbf58c1b00187 + https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bce617edecada007aee8610fbe2c14d10b8de2f6 + https://lore.kernel.org/lkml/CAHk-=wj_V2Tps2QrMn20_W0OJF9xqNh52XSGA42s-ZJ8Y+GyKw@mail.gmail.com/ + +Signed-off-by: Joan Bruguera +--- + zc.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/zc.c ++++ b/zc.c +@@ -76,10 +76,14 @@ int __get_userbuf(uint8_t __user *addr, + ret = get_user_pages_remote(task, mm, + (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, + pg, NULL); +-#else ++#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0)) + ret = get_user_pages_remote(task, mm, + (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, + pg, NULL, NULL); ++#else ++ ret = get_user_pages_remote(mm, ++ (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, ++ pg, NULL, NULL); + #endif + #if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)) + up_read(&mm->mmap_sem);