Thread (60 messages) 60 messages, 6 authors, 2019-02-01

Re: [PATCH 05/18] Add io_uring IO interface

flat view

From: Jann Horn <jannh@google.com>
Date: 2019-01-29 15:36:22
Also in: linux-block

On Mon, Jan 28, 2019 at 10:35 PM Jens Axboe [off-list ref] wrote:
The submission queue (SQ) and completion queue (CQ) rings are shared
between the application and the kernel. This eliminates the need to
copy data back and forth to submit and complete IO.
[...]
quoted hunk ↗ jump to hunk
+static int io_import_iovec(struct io_ring_ctx *ctx, int rw,
+                          const struct io_uring_sqe *sqe,
+                          struct iovec **iovec, struct iov_iter *iter)
+{
+       void __user *buf = u64_to_user_ptr(sqe->addr);
+
+#ifdef CONFIG_COMPAT
+       if (in_compat_syscall())
+               return compat_import_iovec(rw, buf, sqe->len, UIO_FASTIOV,
+                                               iovec, iter);
+#endif
+
+       return import_iovec(rw, buf, sqe->len, UIO_FASTIOV, iovec, iter);
+}
This code can run in kthread context, right? I think
in_compat_syscall() might not work if this is a kthread launched by a
compat task; I don't see anything that propagates the compat flag to
the kthread.

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help