public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-kernel/cryptodev/files/, sys-kernel/cryptodev/
@ 2018-09-02 12:15 Sven Wegener
  0 siblings, 0 replies; 2+ messages in thread
From: Sven Wegener @ 2018-09-02 12:15 UTC (permalink / raw
  To: gentoo-commits

commit:     b8faf2233a6dc7d4f2a0e8ece8feb73a14188f4d
Author:     Sven Wegener <swegener <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  2 12:09:57 2018 +0000
Commit:     Sven Wegener <swegener <AT> gentoo <DOT> org>
CommitDate: Sun Sep  2 12:14:31 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b8faf223

sys-kernel/cryptodev: Fix building with Linux >=4.17

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 sys-kernel/cryptodev/cryptodev-1.9.ebuild          |  5 ++-
 .../files/ioctl.c-Fix-build-with-linux-4.17.patch  | 39 ++++++++++++++++++++++
 2 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/sys-kernel/cryptodev/cryptodev-1.9.ebuild b/sys-kernel/cryptodev/cryptodev-1.9.ebuild
index db23339300e..7ac492ca811 100644
--- a/sys-kernel/cryptodev/cryptodev-1.9.ebuild
+++ b/sys-kernel/cryptodev/cryptodev-1.9.ebuild
@@ -23,7 +23,10 @@ S=${WORKDIR}/${PN}-linux-${PV}
 MODULE_NAMES="cryptodev(extra:${S})"
 BUILD_PARAMS="KERNEL_DIR=\"\${KV_OUT_DIR}\""
 
-PATCHES="${FILESDIR}/cryptodev-1.9-fix-build-with-4.14-629958.patch"
+PATCHES=(
+	"${FILESDIR}"/cryptodev-1.9-fix-build-with-4.14-629958.patch
+	"${FILESDIR}"/ioctl.c-Fix-build-with-linux-4.17.patch
+)
 
 pkg_pretend() {
 	if use kernel_linux ; then

diff --git a/sys-kernel/cryptodev/files/ioctl.c-Fix-build-with-linux-4.17.patch b/sys-kernel/cryptodev/files/ioctl.c-Fix-build-with-linux-4.17.patch
new file mode 100644
index 00000000000..3eb81e4d9d7
--- /dev/null
+++ b/sys-kernel/cryptodev/files/ioctl.c-Fix-build-with-linux-4.17.patch
@@ -0,0 +1,39 @@
+From f60aa08c63fc02780554a0a12180a478ca27d49f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Horia=20Geant=C4=83?= <horia.geanta@nxp.com>
+Date: Wed, 23 May 2018 18:43:39 +0300
+Subject: [PATCH] ioctl.c: Fix build with linux 4.17
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Since kernel 4.17-rc1, sys_* syscalls can no longer be called directly:
+819671ff849b ("syscalls: define and explain goal to not call syscalls in the kernel")
+
+Since cryptodev uses sys_close() - and this has been removed in commit:
+2ca2a09d6215 ("fs: add ksys_close() wrapper; remove in-kernel calls to sys_close()")
+cryptodev has to be updated to use the ksys_close() wrapper.
+
+Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
+---
+ ioctl.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/ioctl.c b/ioctl.c
+index d831b0c..2571034 100644
+--- a/ioctl.c
++++ b/ioctl.c
+@@ -828,7 +828,11 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_)
+ 		fd = clonefd(filp);
+ 		ret = put_user(fd, p);
+ 		if (unlikely(ret)) {
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0))
+ 			sys_close(fd);
++#else
++			ksys_close(fd);
++#endif
+ 			return ret;
+ 		}
+ 		return ret;
+-- 
+2.16.4
+


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-kernel/cryptodev/files/, sys-kernel/cryptodev/
@ 2021-04-01 18:47 Sven Wegener
  0 siblings, 0 replies; 2+ messages in thread
From: Sven Wegener @ 2021-04-01 18:47 UTC (permalink / raw
  To: gentoo-commits

commit:     9476f32feb9b4aa803d4b47c4fb927000203e1f6
Author:     Sven Wegener <swegener <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  1 18:46:27 2021 +0000
Commit:     Sven Wegener <swegener <AT> gentoo <DOT> org>
CommitDate: Thu Apr  1 18:46:27 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9476f32f

sys-kernel/cryptodev: Cleanup

Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Sven Wegener <swegener <AT> gentoo.org>

 sys-kernel/cryptodev/Manifest                      |  1 -
 sys-kernel/cryptodev/cryptodev-1.9-r1.ebuild       | 56 ----------------------
 .../cryptodev-1.9-fix-build-with-4.14-629958.patch | 44 -----------------
 .../files/ioctl.c-Fix-build-with-linux-4.17.patch  | 39 ---------------
 4 files changed, 140 deletions(-)

diff --git a/sys-kernel/cryptodev/Manifest b/sys-kernel/cryptodev/Manifest
index 5fa4d78fc0b..37705199474 100644
--- a/sys-kernel/cryptodev/Manifest
+++ b/sys-kernel/cryptodev/Manifest
@@ -1,3 +1,2 @@
 DIST cryptodev-linux-1.11.tar.gz 56876 BLAKE2B 97cf09c515c586372b2c5bd450e445afd5f80ed8ab39002545dc550c63480469a5318214f467444618e4e1783b9ab999b550cfb16d8ded6de26671a0727d06c2 SHA512 f7b76e9a154945514e2238cd7106cb50cea8120febc79228d6a8ba2dfaf98d5f0756d970df76fd63bda4755d7e0d78331aea394c3c5c18794b7ef1a8738fddba
 DIST cryptodev-linux-1.12.tar.gz 56922 BLAKE2B ec3d6585cbc15027468c0d009dfad1437286e71f90247b6b07067e1355483d9a3184cb0134ab4cfb406168b1b506fb08d4a0ab6476b71305267769a33e5ed2de SHA512 75f4f20ee7474375fd515cfd4f247f9a61739ac766525cd8fe007adfa44129d90077568d59409f577202a4d8883539b0d533dd5e060a1065b61106f68ea5e4b3
-DIST cryptodev-linux-1.9.tar.gz 54409 BLAKE2B 48427235409c792001f420c8a66ab4320457a1cf22c1bf47c8d0a40ef82491ffe64a27b7f2e7ed92f3b8b426fc8425bd15b2bf9c875bb222de8b738022adf99f SHA512 8aff822e834d7d77f2b954b3f6de22d7de9659dac27b8a185b7ca060ff4b17bd38e287bb5c19043a53f5015a3f000d31be961695152bad0fb9f55785b2753d29

diff --git a/sys-kernel/cryptodev/cryptodev-1.9-r1.ebuild b/sys-kernel/cryptodev/cryptodev-1.9-r1.ebuild
deleted file mode 100644
index 6041c66cd1d..00000000000
--- a/sys-kernel/cryptodev/cryptodev-1.9-r1.ebuild
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit linux-info linux-mod
-
-DESCRIPTION="device that allows access to Linux kernel cryptographic drivers"
-HOMEPAGE="http://cryptodev-linux.org/index.html"
-SRC_URI="http://nwl.cc/pub/cryptodev-linux/${PN}-linux-${PV}.tar.gz"
-KEYWORDS="~amd64 ~arm ~x86"
-
-LICENSE="GPL-2+"
-SLOT="0"
-IUSE="examples"
-
-DEPEND="virtual/linux-sources"
-
-#test requires that the module is already loaded
-RESTRICT="test"
-
-S=${WORKDIR}/${PN}-linux-${PV}
-
-MODULE_NAMES="cryptodev(extra:${S})"
-BUILD_PARAMS="KERNEL_DIR=\"\${KV_OUT_DIR}\""
-
-PATCHES=(
-	"${FILESDIR}"/cryptodev-1.9-fix-build-with-4.14-629958.patch
-	"${FILESDIR}"/ioctl.c-Fix-build-with-linux-4.17.patch
-)
-
-pkg_pretend() {
-	if use kernel_linux ; then
-		CONFIG_CHECK="~CRYPTO ~CRYPTO_BLKCIPHER ~CRYPTO_AEAD"
-		check_extra_config
-	fi
-}
-
-pkg_setup() {
-	if use kernel_linux ; then
-		linux-mod_pkg_setup
-	else
-		die "cryptodev ebuild only support linux"
-	fi
-	BUILD_TARGETS="build"
-	export KERNEL_DIR
-}
-
-src_install() {
-	linux-mod_src_install
-	if use examples ; then
-		docinto examples
-		dodoc example/*
-	fi
-	insinto /usr/include/crypto
-	doins crypto/cryptodev.h
-}

diff --git a/sys-kernel/cryptodev/files/cryptodev-1.9-fix-build-with-4.14-629958.patch b/sys-kernel/cryptodev/files/cryptodev-1.9-fix-build-with-4.14-629958.patch
deleted file mode 100644
index 8a78d5ec876..00000000000
--- a/sys-kernel/cryptodev/files/cryptodev-1.9-fix-build-with-4.14-629958.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From f0d69774afb27ffc62bf353465fba145e70cb85a Mon Sep 17 00:00:00 2001
-From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
-Date: Mon, 4 Sep 2017 11:05:08 +0200
-Subject: [PATCH] ioctl.c: Fix build with linux 4.13
-
-git/ioctl.c:1127:3: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
-   {0, },
-    ^
-note: (near initialization for 'verbosity_ctl_dir[1]')
-git/ioctl.c:1136:3: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
-   {0, },
-    ^
-
-Linux kernel has added -Werror=designated-init around 4.11 (c834f0e8a8b)
-triggering build errors with gcc 5 and 6 (but not with gcc 4)
-
-Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
-Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com>
----
- ioctl.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/ioctl.c b/ioctl.c
-index 0385203..8d4a162 100644
---- a/ioctl.c
-+++ b/ioctl.c
-@@ -1124,7 +1124,7 @@ static struct ctl_table verbosity_ctl_dir[] = {
- 		.mode           = 0644,
- 		.proc_handler   = proc_dointvec,
- 	},
--	{0, },
-+	{},
- };
- 
- static struct ctl_table verbosity_ctl_root[] = {
-@@ -1133,7 +1133,7 @@ static struct ctl_table verbosity_ctl_root[] = {
- 		.mode           = 0555,
- 		.child          = verbosity_ctl_dir,
- 	},
--	{0, },
-+	{},
- };
- static struct ctl_table_header *verbosity_sysctl_header;
- static int __init init_cryptodev(void)

diff --git a/sys-kernel/cryptodev/files/ioctl.c-Fix-build-with-linux-4.17.patch b/sys-kernel/cryptodev/files/ioctl.c-Fix-build-with-linux-4.17.patch
deleted file mode 100644
index 3eb81e4d9d7..00000000000
--- a/sys-kernel/cryptodev/files/ioctl.c-Fix-build-with-linux-4.17.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From f60aa08c63fc02780554a0a12180a478ca27d49f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Horia=20Geant=C4=83?= <horia.geanta@nxp.com>
-Date: Wed, 23 May 2018 18:43:39 +0300
-Subject: [PATCH] ioctl.c: Fix build with linux 4.17
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Since kernel 4.17-rc1, sys_* syscalls can no longer be called directly:
-819671ff849b ("syscalls: define and explain goal to not call syscalls in the kernel")
-
-Since cryptodev uses sys_close() - and this has been removed in commit:
-2ca2a09d6215 ("fs: add ksys_close() wrapper; remove in-kernel calls to sys_close()")
-cryptodev has to be updated to use the ksys_close() wrapper.
-
-Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
----
- ioctl.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/ioctl.c b/ioctl.c
-index d831b0c..2571034 100644
---- a/ioctl.c
-+++ b/ioctl.c
-@@ -828,7 +828,11 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_)
- 		fd = clonefd(filp);
- 		ret = put_user(fd, p);
- 		if (unlikely(ret)) {
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0))
- 			sys_close(fd);
-+#else
-+			ksys_close(fd);
-+#endif
- 			return ret;
- 		}
- 		return ret;
--- 
-2.16.4
-


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-01 18:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-02 12:15 [gentoo-commits] repo/gentoo:master commit in: sys-kernel/cryptodev/files/, sys-kernel/cryptodev/ Sven Wegener
  -- strict thread matches above, loose matches on Subject: below --
2021-04-01 18:47 Sven Wegener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox