summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHe Zhe <zhe.he@windriver.com>2018-06-21 04:08:45 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-18 11:09:39 +0100
commitcaa4a47877c41c19d42969e7e7ccab6c272cb976 (patch)
treeed4983ef9009ea1eb0c755f63ad620acfa1af135
parentcfcbc502a7d41752b28abab892314391829e4fce (diff)
downloadpoky-caa4a47877c41c19d42969e7e7ccab6c272cb976.tar.gz
cryptodev: Fix build errors with v4.17+
Backport from upstream to update internal syscall function usage. https://github.com/cryptodev-linux/cryptodev-linux f60aa08c63fc02780554a0a12180a478ca27d49f (From OE-Core rev: 270a1e9bcf26a43f5cbdc5b901c4c6f79495311d) (From OE-Core rev: 87718444c054bad8d83e19d4ead2397420c63289) Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-kernel/cryptodev/cryptodev-module_1.9.bb1
-rw-r--r--meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-with-linux-4.17.patch43
2 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-kernel/cryptodev/cryptodev-module_1.9.bb b/meta/recipes-kernel/cryptodev/cryptodev-module_1.9.bb
index ed6d0ecae9..6052650c95 100644
--- a/meta/recipes-kernel/cryptodev/cryptodev-module_1.9.bb
+++ b/meta/recipes-kernel/cryptodev/cryptodev-module_1.9.bb
@@ -10,6 +10,7 @@ DEPENDS += "cryptodev-linux"
10SRC_URI += " \ 10SRC_URI += " \
11file://0001-Disable-installing-header-file-provided-by-another-p.patch \ 11file://0001-Disable-installing-header-file-provided-by-another-p.patch \
12file://0001-ioctl.c-Fix-build-with-linux-4.13.patch \ 12file://0001-ioctl.c-Fix-build-with-linux-4.13.patch \
13file://0001-ioctl.c-Fix-build-with-linux-4.17.patch \
13" 14"
14 15
15EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' 16EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"'
diff --git a/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-with-linux-4.17.patch b/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-with-linux-4.17.patch
new file mode 100644
index 0000000000..5881d1c4ee
--- /dev/null
+++ b/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-with-linux-4.17.patch
@@ -0,0 +1,43 @@
1From f60aa08c63fc02780554a0a12180a478ca27d49f Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Horia=20Geant=C4=83?= <horia.geanta@nxp.com>
3Date: Wed, 23 May 2018 18:43:39 +0300
4Subject: [PATCH] ioctl.c: Fix build with linux 4.17
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Since kernel 4.17-rc1, sys_* syscalls can no longer be called directly:
10819671ff849b ("syscalls: define and explain goal to not call syscalls in the kernel")
11
12Since cryptodev uses sys_close() - and this has been removed in commit:
132ca2a09d6215 ("fs: add ksys_close() wrapper; remove in-kernel calls to sys_close()")
14cryptodev has to be updated to use the ksys_close() wrapper.
15
16Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
17
18Upstream-Status: Backport
19
20Signed-off-by: He Zhe <zhe.he@windriver.com>
21---
22 ioctl.c | 4 ++++
23 1 file changed, 4 insertions(+)
24
25diff --git a/ioctl.c b/ioctl.c
26index d831b0c..2571034 100644
27--- a/ioctl.c
28+++ b/ioctl.c
29@@ -828,7 +828,11 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_)
30 fd = clonefd(filp);
31 ret = put_user(fd, p);
32 if (unlikely(ret)) {
33+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0))
34 sys_close(fd);
35+#else
36+ ksys_close(fd);
37+#endif
38 return ret;
39 }
40 return ret;
41--
422.7.4
43