Thread (19 messages) 19 messages, 4 authors, 2019-01-31

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

flat view

From: Jens Axboe <axboe@kernel.dk>
Date: 2019-01-29 01:20:14
Also in: linux-block, linux-fsdevel, linux-man

On 1/28/19 5:47 PM, Andy Lutomirski wrote:
On Mon, Jan 28, 2019 at 6:57 AM Christoph Hellwig [off-list ref] wrote:
quoted
[please make sure linux-api and linux-man are CCed on new syscalls
so that we get API experts to review them]
quoted
quoted
+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 (ctx->compat)
+             return compat_import_iovec(rw, buf, sqe->len, UIO_FASTIOV,
+                                             iovec, iter);
+#endif
I think we can just check in_compat_syscall() here, which means we
can kill the ->compat member, and the separate compat version of the
setup syscall.
Since this whole API is new, I don't suppose you could introduce a
struct iovec64 or similar and just make the ABI be identical for
64-bit and 32-bit code?
Sure, that would be straight forward. Is there a strong reason to do
so outside of "that would be nice"? It's not like it's a huge amount
of code.

-- 
Jens Axboe

--
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