kumquat-buildroot/package/cryptodev-linux/0001-zero-copy-Fix-build-for-Linux-6-4.patch
Fabrice Fontaine f5eba2ef3a package/cryptodev-linux: fix build with linux >= 6.4
Fix the following build failure with linux >= 6.4:

/home/autobuild/autobuild/instance-15/output-1/build/cryptodev-linux-1.13/./ioctl.c:1249:18: error: ‘struct ctl_table’ has no member named ‘child’
 1249 |                 .child          = verbosity_ctl_dir,
      |                  ^~~~~

Fixes:
 - http://autobuild.buildroot.org/results/ecbf426f6b0ff920a51c1674b080c35edf5db859

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-01-04 22:43:22 +01:00

38 lines
1.3 KiB
Diff

From 592017c3a910a3905b1925aee88c4674e9a596b7 Mon Sep 17 00:00:00 2001
From: Gaurav Jain <gaurav.jain@nxp.com>
Date: Tue, 30 May 2023 17:09:42 +0530
Subject: [PATCH] zero copy: Fix build for Linux 6.4
get_user_pages_remote api prototype is changed in kernel.
struct vm_area_struct **vmas argument is removed.
Migrate to the new API.
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Upstream: https://github.com/cryptodev-linux/cryptodev-linux/commit/592017c3a910a3905b1925aee88c4674e9a596b7
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
zc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/zc.c b/zc.c
index fdf7da17..6637945a 100644
--- a/zc.c
+++ b/zc.c
@@ -80,10 +80,14 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write,
ret = get_user_pages_remote(task, mm,
(unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
pg, NULL, NULL);
-#else
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
ret = get_user_pages_remote(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);
#endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
up_read(&mm->mmap_sem);