All of lore.kernel.org
 help / color / mirror / Atom feed
* [dunfell PATCH] cryptodev-module: Backport a patch to fix build failure with kernel v5.11
@ 2021-04-28  0:14 Nishanth Menon
  0 siblings, 0 replies; only message in thread
From: Nishanth Menon @ 2021-04-28  0:14 UTC (permalink / raw)
  To: praneeth, denis, yogeshs; +Cc: meta-arago

Fix the following build failure with v5.11+ kernel
cryptodev-module/1.10-r0.arago0/git/authenc.c: In function 'pad_record':
cryptodev-module/1.10-r0.arago0/git/authenc.c:317:2: warning: ISO C90 forbids variable length array 'pad' [-Wvla]
 317 |  uint8_t pad[block_size];
     |  ^~~~~~~
cryptodev-module/1.10-r0.arago0/git/ioctl.c: In function 'cryptodev_ioctl':
cryptodev-module/1.10-r0.arago0/git/ioctl.c:875:4: error: implicit declaration of function 'ksys_close'; did you mean 'ksys_chown'? [-Werror=implicit-function-declaration]
 875 |    ksys_close(fd);
     |    ^~~~~~~~~~
     |    ksys_chown


OE Core does'nt plan on fixing dunfell branch up for newer kernel, and
oe master already is on 1.12 cryptodev with the fixes already in place.

Signed-off-by: Nishanth Menon <nm@ti.com>
---

oe master is already at 1.12 release which has this fix incorporated, so
this should NOT be applied on meta-arago master.

dunfell has fixes for the previous kernel already, so we just append to
the list of fixes from oe-core.

 .../cryptodev/cryptodev-module_%.bbappend     |  6 +++-
 .../0001-Fix-build-for-Linux-5.11-rc1.patch   | 36 +++++++++++++++++++
 2 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 meta-arago-distro/recipes-kernel/cryptodev/files/0001-Fix-build-for-Linux-5.11-rc1.patch

diff --git a/meta-arago-distro/recipes-kernel/cryptodev/cryptodev-module_%.bbappend b/meta-arago-distro/recipes-kernel/cryptodev/cryptodev-module_%.bbappend
index f8a35cd73765..c210cc4e2613 100644
--- a/meta-arago-distro/recipes-kernel/cryptodev/cryptodev-module_%.bbappend
+++ b/meta-arago-distro/recipes-kernel/cryptodev/cryptodev-module_%.bbappend
@@ -1,3 +1,7 @@
-PR_append = ".arago0"
+PR_append = ".arago1"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += "file://0001-Fix-build-for-Linux-5.11-rc1.patch"
 
 KERNEL_MODULE_AUTOLOAD += "cryptodev"
diff --git a/meta-arago-distro/recipes-kernel/cryptodev/files/0001-Fix-build-for-Linux-5.11-rc1.patch b/meta-arago-distro/recipes-kernel/cryptodev/files/0001-Fix-build-for-Linux-5.11-rc1.patch
new file mode 100644
index 000000000000..df07b9ea251c
--- /dev/null
+++ b/meta-arago-distro/recipes-kernel/cryptodev/files/0001-Fix-build-for-Linux-5.11-rc1.patch
@@ -0,0 +1,36 @@
+From 55c6315058fc0dd189ffd116f2cc27ba4fa84cb6 Mon Sep 17 00:00:00 2001
+From: Joan Bruguera <joanbrugueram@gmail.com>
+Date: Mon, 28 Dec 2020 01:41:31 +0100
+Subject: [PATCH] Fix build for Linux 5.11-rc1
+
+ksys_close was removed, as far as I can tell, close_fd replaces it.
+
+See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8760c909f54a82aaa6e76da19afe798a0c77c3c3
+          https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1572bfdf21d4d50e51941498ffe0b56c2289f783
+
+Upstream-status: Backport [55c6315058fc0dd189ffd116f2cc27ba4fa84cb6]
+
+Signed-off-by: Nishanth Menon <nm@ti.com>
+---
+ ioctl.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/ioctl.c b/ioctl.c
+index 3d33238021dc..95481d4ff8e2 100644
+--- a/ioctl.c
++++ b/ioctl.c
+@@ -871,8 +871,10 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_)
+ 		if (unlikely(ret)) {
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0))
+ 			sys_close(fd);
+-#else
++#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0))
+ 			ksys_close(fd);
++#else
++			close_fd(fd);
+ #endif
+ 			return ret;
+ 		}
+-- 
+2.31.0
+
-- 
2.31.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-28  0:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-28  0:14 [dunfell PATCH] cryptodev-module: Backport a patch to fix build failure with kernel v5.11 Nishanth Menon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.