* [Buildroot] [PATCH 1/1] package/cryptodev-linux: fix build with linux >= 6.4
@ 2024-01-04 17:14 Fabrice Fontaine
2024-01-04 21:43 ` Thomas Petazzoni via buildroot
2024-01-12 17:29 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2024-01-04 17:14 UTC (permalink / raw)
To: buildroot; +Cc: Fabrice Fontaine
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>
---
...01-zero-copy-Fix-build-for-Linux-6-4.patch | 37 ++++++++++++++++
...ev_verbosity-Fix-build-for-Linux-6-4.patch | 44 +++++++++++++++++++
2 files changed, 81 insertions(+)
create mode 100644 package/cryptodev-linux/0001-zero-copy-Fix-build-for-Linux-6-4.patch
create mode 100644 package/cryptodev-linux/0002-cryptodev_verbosity-Fix-build-for-Linux-6-4.patch
diff --git a/package/cryptodev-linux/0001-zero-copy-Fix-build-for-Linux-6-4.patch b/package/cryptodev-linux/0001-zero-copy-Fix-build-for-Linux-6-4.patch
new file mode 100644
index 0000000000..4bea55311c
--- /dev/null
+++ b/package/cryptodev-linux/0001-zero-copy-Fix-build-for-Linux-6-4.patch
@@ -0,0 +1,37 @@
+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);
diff --git a/package/cryptodev-linux/0002-cryptodev_verbosity-Fix-build-for-Linux-6-4.patch b/package/cryptodev-linux/0002-cryptodev_verbosity-Fix-build-for-Linux-6-4.patch
new file mode 100644
index 0000000000..e6022c686f
--- /dev/null
+++ b/package/cryptodev-linux/0002-cryptodev_verbosity-Fix-build-for-Linux-6-4.patch
@@ -0,0 +1,44 @@
+From 99ae2a39ddc3f89c66d9f09783b591c0f2dbf2e9 Mon Sep 17 00:00:00 2001
+From: Gaurav Jain <gaurav.jain@nxp.com>
+Date: Wed, 28 Jun 2023 12:44:32 +0530
+Subject: [PATCH] cryptodev_verbosity: Fix build for Linux 6.4
+
+register_sysctl_table api is removed in kernel.
+migrate to the new api register_sysctl.
+
+child is also removed in linux 6.4 ctl_table struct.
+
+Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
+
+Upstream: https://github.com/cryptodev-linux/cryptodev-linux/commit/99ae2a39ddc3f89c66d9f09783b591c0f2dbf2e9
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ ioctl.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/ioctl.c b/ioctl.c
+index 8f241b86..4262bbd5 100644
+--- a/ioctl.c
++++ b/ioctl.c
+@@ -1246,7 +1246,9 @@ static struct ctl_table verbosity_ctl_root[] = {
+ {
+ .procname = "ioctl",
+ .mode = 0555,
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
+ .child = verbosity_ctl_dir,
++#endif
+ },
+ {},
+ };
+@@ -1267,7 +1269,11 @@ static int __init init_cryptodev(void)
+ return rc;
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
+ verbosity_sysctl_header = register_sysctl_table(verbosity_ctl_root);
++#else
++ verbosity_sysctl_header = register_sysctl(verbosity_ctl_root->procname, verbosity_ctl_dir);
++#endif
+
+ pr_info(PFX "driver %s loaded.\n", VERSION);
+
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/cryptodev-linux: fix build with linux >= 6.4
2024-01-04 17:14 [Buildroot] [PATCH 1/1] package/cryptodev-linux: fix build with linux >= 6.4 Fabrice Fontaine
@ 2024-01-04 21:43 ` Thomas Petazzoni via buildroot
2024-01-12 17:29 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-01-04 21:43 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: buildroot
On Thu, 4 Jan 2024 18:14:47 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> 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>
> ---
> ...01-zero-copy-Fix-build-for-Linux-6-4.patch | 37 ++++++++++++++++
> ...ev_verbosity-Fix-build-for-Linux-6-4.patch | 44 +++++++++++++++++++
> 2 files changed, 81 insertions(+)
> create mode 100644 package/cryptodev-linux/0001-zero-copy-Fix-build-for-Linux-6-4.patch
> create mode 100644 package/cryptodev-linux/0002-cryptodev_verbosity-Fix-build-for-Linux-6-4.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/cryptodev-linux: fix build with linux >= 6.4
2024-01-04 17:14 [Buildroot] [PATCH 1/1] package/cryptodev-linux: fix build with linux >= 6.4 Fabrice Fontaine
2024-01-04 21:43 ` Thomas Petazzoni via buildroot
@ 2024-01-12 17:29 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-01-12 17:29 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> 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>
Committed to 2023.11.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-01-12 17:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-04 17:14 [Buildroot] [PATCH 1/1] package/cryptodev-linux: fix build with linux >= 6.4 Fabrice Fontaine
2024-01-04 21:43 ` Thomas Petazzoni via buildroot
2024-01-12 17:29 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox