-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iov_iter_fault_in_readable is now fault_in_iov_iter_readable #13401
Comments
My initial (untested) hack-around the problem: commit dadbf8fdafae4cc880baf5562d30f41cf4ac0625 (HEAD -> sv5.15.37-grsec)
Author: RageLtMan <rageltman [at] sempervictus>
Date: Sun May 1 21:35:55 2022 -0400
ZFS: Replace iov_iter_fault_in_readable
30e66b1dfcbb removed iov_iter_fault_in_readable and replaced it
with fault_in_iov_iter_readable.
Try to hot-swap the functions in the hope that their returns are
compatible-enough with the design of this code-path to permit
direct substitution without changing the logic around this path.
diff --git a/fs/zfs/os/linux/zfs/zfs_uio.c b/fs/zfs/os/linux/zfs/zfs_uio.c
index 3ac8645fe4db..c276176347df 100644
--- a/fs/zfs/os/linux/zfs/zfs_uio.c
+++ b/fs/zfs/os/linux/zfs/zfs_uio.c
@@ -358,10 +358,10 @@ zfs_uio_prefaultpages(ssize_t n, zfs_uio_t *uio)
#if defined(HAVE_VFS_IOV_ITER)
} else if (uio->uio_segflg == UIO_ITER) {
/*
- * At least a Linux 4.9 kernel, iov_iter_fault_in_readable()
+ * At least a Linux 5.15.37 kernel, fault_in_iov_iter_readable()
* can be relied on to fault in user pages when referenced.
*/
- if (iov_iter_fault_in_readable(uio->uio_iter, n))
+ if (fault_in_iov_iter_readable(uio->uio_iter, n))
return (EFAULT);
#endif |
#12975 should have a rewrite header for that; perhaps you could revise that to figure out why it's not working now? |
@rincebrain - a bit "all out" on other efforts right now, but i'm guessing the AC code does a version check not a functional check, because i just re-ran the copy in-tree routine and diffing out from my fixed branch i see: diff --git c/fs/zfs/os/linux/zfs/zfs_uio.c w/fs/zfs/os/linux/zfs/zfs_uio.c
index c276176347df..3ac8645fe4db 100644
--- c/fs/zfs/os/linux/zfs/zfs_uio.c
+++ w/fs/zfs/os/linux/zfs/zfs_uio.c
@@ -358,10 +358,10 @@ zfs_uio_prefaultpages(ssize_t n, zfs_uio_t *uio)
#if defined(HAVE_VFS_IOV_ITER)
} else if (uio->uio_segflg == UIO_ITER) {
/*
- * At least a Linux 5.15.37 kernel, fault_in_iov_iter_readable()
+ * At least a Linux 4.9 kernel, iov_iter_fault_in_readable()
* can be relied on to fault in user pages when referenced.
*/
- if (fault_in_iov_iter_readable(uio->uio_iter, n))
+ if (iov_iter_fault_in_readable(uio->uio_iter, n))
return (EFAULT);
#endif
} else { |
It just generates a |
If you can manually run the configure check that will show why it didn't detect the new interface. After running |
This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions. |
@sempervictus is this still an issue with certain kernels? |
Just caught a crash on my in-tree build:
someone smarter than me pointed out that this recently hit mainline:
So we need to have that properly handled in the autoconf pieces and source.
I'm going to try doing a gross patch of the in-kernel code to replace the function with the new one in the hopes that it works correctly (lets hope ztest catches this), but i won't have time to do the detailed build system work for a bit and this is going to bite others shortly.
The text was updated successfully, but these errors were encountered: