From patchwork Thu Dec 24 13:06:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stijn Segers X-Patchwork-Id: 1420524 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=volatilesystems.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=0giZGDYy; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=volatilesystems.org header.i=@volatilesystems.org header.a=rsa-sha256 header.s=mail header.b=ZY/fPVkH; dkim=fail reason="signature verification failed" (1024-bit key) header.d=volatilesystems.org header.i=@volatilesystems.org header.a=rsa-sha256 header.s=mail header.b=dxcsP7aJ; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D1r7L5ZLqz9sTL for ; Fri, 25 Dec 2020 00:11:25 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=JseeFV92IdvKFt1v2b22Nh4YLviC2/tAEe+TAd8XkBM=; b=0giZGDYyVMP8rkI1QJVBZVEZVK IuOc4fzDRExURCqI1DDI3vBpV/hIrXRcfCqW/dOZTYirNEux2A9ZXdTguXYhdp6oIIbsLAPvTjD7Z HGFgB/vFWVz8D7IBI5bE1evL9klNEfueULqqr9l2Tw+C2cCPfhdPB4zPPeuK9IQOSnzetWO53U7Mo NLQIG+s0yE1fe8qV/ArF2XlTU1i6XCUFsz4QXkNUYEstbaLnF7pQkfGPIhC5ym+G8QsPz3tWa8FvB 5ecY3bS1VAgjfsRYmwnPFoqKV3eAgx3o6+hq2wgcdIVuR92PH+/fQe+sfK4bqk0zJEn0TjzoVkGI5 FZEmmOGg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ksQKb-0007uT-NL; Thu, 24 Dec 2020 13:07:01 +0000 Received: from [2001:41d0:305:2100::8f39] (helo=volatilesystems.org) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ksQKY-0007to-BQ for openwrt-devel@lists.openwrt.org; Thu, 24 Dec 2020 13:06:59 +0000 Received: by volatilesystems.org (Postfix, from userid 112) id 5A2B5FA0F8; Thu, 24 Dec 2020 14:06:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=volatilesystems.org; s=mail; t=1608815183; bh=NvxHdr/jLRhZehPEx3lY0eVMnf1zG3txp8WrmKXRRWg=; h=From:To:Cc:Subject:Date:From; b=ZY/fPVkHADxrgN0nTSqcwSXd5jdNY15O8l33aSMVQO55FVjWcZiKkv+8MqGxM/Y5V ppjLWvSXl9QgYsJkG6Hj+UEyLLIpVvqaXB0ktysgVzUOzNwWA8or5uNxK3c/RCG+Bf UXaTfKxCCRyIyN0v5yhcU8brZHkHQa17OWUnrbVY= X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on atalanta X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from okeanos.lan (212.71.13.144.adsl.dyn.edpnet.net [212.71.13.144]) by volatilesystems.org (Postfix) with ESMTPSA id 993B6FA0F5; Thu, 24 Dec 2020 14:06:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=volatilesystems.org; s=mail; t=1608815181; bh=NvxHdr/jLRhZehPEx3lY0eVMnf1zG3txp8WrmKXRRWg=; h=From:To:Cc:Subject:Date:From; b=dxcsP7aJMBXk54qe6UKM7ZnekMkhGPmL20hlMXqpSeFOJGy84ccIOjAWKDegplg5G eF+wZZMWwEgPYzi6gj4kJkGzHx4tx6V1Bx5+RKMP8aj6lRbW6DgglbiptqjjZtskxI cRZagZNTzT4XG17mB4NiEdqY1Co7wBynitOaH5Sw= From: Stijn Segers To: openwrt-devel@lists.openwrt.org Subject: [PATCH] cryptodev-linux: bump to 1.11, fix build against kernel 5.10. Date: Thu, 24 Dec 2020 14:06:17 +0100 Message-Id: <20201224130617.22538-1-foss@volatilesystems.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at atalanta X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201224_080658_618626_67462CFA X-CRM114-Status: GOOD ( 20.20 ) X-Spam-Score: 1.1 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Derald D . Woods" Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org 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 --- package/kernel/cryptodev-linux/Makefile | 6 +-- ...x-module-loading-with-Linux-v5.0-rc5.patch | 50 ------------------- .../010-fix-build-for-kernel-v5.9-rc1.patch | 32 ++++++++++++ 3 files changed, 35 insertions(+), 53 deletions(-) delete mode 100644 package/kernel/cryptodev-linux/patches/010-Fix-module-loading-with-Linux-v5.0-rc5.patch create mode 100644 package/kernel/cryptodev-linux/patches/010-fix-build-for-kernel-v5.9-rc1.patch 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);