<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/io_uring/net.c, branch v6.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-03-21T02:44:45Z</updated>
<entry>
<title>io_uring/net: avoid sending -ECONNABORTED on repeated connection requests</title>
<updated>2023-03-21T02:44:45Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2023-03-20T17:13:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=74e2e17ee1f8d8a0928b90434ad7e2df70f8483e'/>
<id>urn:sha1:74e2e17ee1f8d8a0928b90434ad7e2df70f8483e</id>
<content type='text'>
Since io_uring does nonblocking connect requests, if we do two repeated
ones without having a listener, the second will get -ECONNABORTED rather
than the expected -ECONNREFUSED. Treat -ECONNABORTED like a normal retry
condition if we're nonblocking, if we haven't already seen it.

Cc: stable@vger.kernel.org
Fixes: 3fb1bd688172 ("io_uring/net: handle -EINPROGRESS correct for IORING_OP_CONNECT")
Link: https://github.com/axboe/liburing/issues/828
Reported-by: Hui, Chunyang &lt;sanqian.hcy@antgroup.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: remove MSG_NOSIGNAL from recvmsg</title>
<updated>2023-02-24T19:59:02Z</updated>
<author>
<name>David Lamparter</name>
<email>equinox@diac24.net</email>
</author>
<published>2023-02-24T15:01:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7605c43d67face310b4b87dee1a28bc0c8cd8c0f'/>
<id>urn:sha1:7605c43d67face310b4b87dee1a28bc0c8cd8c0f</id>
<content type='text'>
MSG_NOSIGNAL is not applicable for the receiving side, SIGPIPE is
generated when trying to write to a "broken pipe".  AF_PACKET's
packet_recvmsg() does enforce this, giving back EINVAL when MSG_NOSIGNAL
is set - making it unuseable in io_uring's recvmsg.

Remove MSG_NOSIGNAL from io_recvmsg_prep().

Cc: stable@vger.kernel.org # v5.10+
Signed-off-by: David Lamparter &lt;equinox@diac24.net&gt;
Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Reviewed-by: Eric Dumazet &lt;edumazet@google.com&gt;
Link: https://lore.kernel.org/r/20230224150123.128346-1-equinox@diac24.net
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-6.3/iter-ubuf-2023-02-16' of git://git.kernel.dk/linux</title>
<updated>2023-02-20T22:03:57Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-02-20T22:03:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c1ef5003079531b5aae12467a350379496752334'/>
<id>urn:sha1:c1ef5003079531b5aae12467a350379496752334</id>
<content type='text'>
Pull io_uring ITER_UBUF conversion from Jens Axboe:
 "Since we now have ITER_UBUF available, switch to using it for single
  ranges as it's more efficient than ITER_IOVEC for that"

* tag 'for-6.3/iter-ubuf-2023-02-16' of git://git.kernel.dk/linux:
  block: use iter_ubuf for single range
  iov_iter: move iter_ubuf check inside restore WARN
  io_uring: use iter_ubuf for single range imports
  io_uring: switch network send/recv to ITER_UBUF
  iov: add import_ubuf()
</content>
</entry>
<entry>
<title>io_uring: for requests that require async, force it</title>
<updated>2023-01-29T22:18:26Z</updated>
<author>
<name>Dylan Yudaken</name>
<email>dylany@meta.com</email>
</author>
<published>2023-01-27T13:52:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aebb224fd4fc7352cd839ad90414c548387142fd'/>
<id>urn:sha1:aebb224fd4fc7352cd839ad90414c548387142fd</id>
<content type='text'>
Some requests require being run async as they do not support
non-blocking. Instead of trying to issue these requests, getting -EAGAIN
and then queueing them for async issue, rather just force async upfront.

Add WARN_ON_ONCE to make sure surprising code paths do not come up,
however in those cases the bug would end up being a blocking
io_uring_enter(2) which should not be critical.

Signed-off-by: Dylan Yudaken &lt;dylany@meta.com&gt;
Link: https://lore.kernel.org/r/20230127135227.3646353-3-dylany@meta.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring/net: cache provided buffer group value for multishot receives</title>
<updated>2023-01-23T14:08:08Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2023-01-22T17:02:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b00c51ef8f72ced0965d021a291b98ff822c5337'/>
<id>urn:sha1:b00c51ef8f72ced0965d021a291b98ff822c5337</id>
<content type='text'>
If we're using ring provided buffers with multishot receive, and we end
up doing an io-wq based issue at some points that also needs to select
a buffer, we'll lose the initially assigned buffer group as
io_ring_buffer_select() correctly clears the buffer group list as the
issue isn't serialized by the ctx uring_lock. This is fine for normal
receives as the request puts the buffer and finishes, but for multishot,
we will re-arm and do further receives. On the next trigger for this
multishot receive, the receive will try and pick from a buffer group
whose value is the same as the buffer ID of the las receive. That is
obviously incorrect, and will result in a premature -ENOUFS error for
the receive even if we had available buffers in the correct group.

Cache the buffer group value at prep time, so we can restore it for
future receives. This only needs doing for the above mentioned case, but
just do it by default to keep it easier to read.

Cc: stable@vger.kernel.org
Fixes: b3fdea6ecb55 ("io_uring: multishot recv")
Fixes: 9bb66906f23e ("io_uring: support multishot in recvmsg")
Cc: Dylan Yudaken &lt;dylany@meta.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: switch network send/recv to ITER_UBUF</title>
<updated>2023-01-09T03:59:17Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2023-01-05T19:07:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4b61152e107a95bc0a73d84072dbd75cb97689e3'/>
<id>urn:sha1:4b61152e107a95bc0a73d84072dbd75cb97689e3</id>
<content type='text'>
This is more efficient than iter_iov.

Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
[merged to 6.2]
Signed-off-by: Keith Busch &lt;kbusch@kernel.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>io_uring/net: fix cleanup after recycle</title>
<updated>2022-12-19T15:28:28Z</updated>
<author>
<name>Pavel Begunkov</name>
<email>asml.silence@gmail.com</email>
</author>
<published>2022-12-19T15:11:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6c3e8955d4bd9811a6e1761eea412a14fb51a2e6'/>
<id>urn:sha1:6c3e8955d4bd9811a6e1761eea412a14fb51a2e6</id>
<content type='text'>
Don't access io_async_msghdr io_netmsg_recycle(), it may be reallocated.

Cc: stable@vger.kernel.org
Fixes: 9bb66906f23e5 ("io_uring: support multishot in recvmsg")
Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/9e326f4ad4046ddadf15bf34bf3fa58c6372f6b5.1671461985.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring/net: ensure compat import handlers clear free_iov</title>
<updated>2022-12-19T14:35:16Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2022-12-19T14:28:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=990a4de57e44f4f4cfc33c90d2ec5d285b7c8342'/>
<id>urn:sha1:990a4de57e44f4f4cfc33c90d2ec5d285b7c8342</id>
<content type='text'>
If we're not allocating the vectors because the count is below
UIO_FASTIOV, we still do need to properly clear -&gt;free_iov to prevent
an erronous free of on-stack data.

Reported-by: Jiri Slaby &lt;jirislaby@gmail.com&gt;
Fixes: 4c17a496a7a0 ("io_uring/net: fix cleanup double free free_iov init")
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-6.2/io_uring-next-2022-12-08' of git://git.kernel.dk/linux</title>
<updated>2022-12-13T18:40:31Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-12-13T18:40:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=96f7e448b9f4546ffd0356ffceb2b9586777f316'/>
<id>urn:sha1:96f7e448b9f4546ffd0356ffceb2b9586777f316</id>
<content type='text'>
Pull io_uring updates part two from Jens Axboe:

 - Misc fixes (me, Lin)

 - Series from Pavel extending the single task exclusive ring mode,
   yielding nice improvements for the common case of having a single
   ring per thread (Pavel)

 - Cleanup for MSG_RING, removing our IOPOLL hack (Pavel)

 - Further poll cleanups and fixes (Pavel)

 - Misc cleanups and fixes (Pavel)

* tag 'for-6.2/io_uring-next-2022-12-08' of git://git.kernel.dk/linux: (22 commits)
  io_uring/msg_ring: flag target ring as having task_work, if needed
  io_uring: skip spinlocking for -&gt;task_complete
  io_uring: do msg_ring in target task via tw
  io_uring: extract a io_msg_install_complete helper
  io_uring: get rid of double locking
  io_uring: never run tw and fallback in parallel
  io_uring: use tw for putting rsrc
  io_uring: force multishot CQEs into task context
  io_uring: complete all requests in task context
  io_uring: don't check overflow flush failures
  io_uring: skip overflow CQE posting for dying ring
  io_uring: improve io_double_lock_ctx fail handling
  io_uring: dont remove file from msg_ring reqs
  io_uring: reshuffle issue_flags
  io_uring: don't reinstall quiesce node for each tw
  io_uring: improve rsrc quiesce refs checks
  io_uring: don't raw spin unlock to match cq_lock
  io_uring: combine poll tw handlers
  io_uring: improve poll warning handling
  io_uring: remove ctx variable in io_poll_check_events
  ...
</content>
</entry>
<entry>
<title>Merge tag 'for-6.2/io_uring-2022-12-08' of git://git.kernel.dk/linux</title>
<updated>2022-12-13T18:33:08Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-12-13T18:33:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=54e60e505d6144a22c787b5be1fdce996a27be1b'/>
<id>urn:sha1:54e60e505d6144a22c787b5be1fdce996a27be1b</id>
<content type='text'>
Pull io_uring updates from Jens Axboe:

 - Always ensure proper ordering in case of CQ ring overflow, which then
   means we can remove some work-arounds for that (Dylan)

 - Support completion batching for multishot, greatly increasing the
   efficiency for those (Dylan)

 - Flag epoll/eventfd wakeups done from io_uring, so that we can easily
   tell if we're recursing into io_uring again.

   Previously, this would have resulted in repeated multishot
   notifications if we had a dependency there. That could happen if an
   eventfd was registered as the ring eventfd, and we multishot polled
   for events on it. Or if an io_uring fd was added to epoll, and
   io_uring had a multishot request for the epoll fd.

   Test cases here:
	https://git.kernel.dk/cgit/liburing/commit/?id=919755a7d0096fda08fb6d65ac54ad8d0fe027cd

   Previously these got terminated when the CQ ring eventually
   overflowed, now it's handled gracefully (me).

 - Tightening of the IOPOLL based completions (Pavel)

 - Optimizations of the networking zero-copy paths (Pavel)

 - Various tweaks and fixes (Dylan, Pavel)

* tag 'for-6.2/io_uring-2022-12-08' of git://git.kernel.dk/linux: (41 commits)
  io_uring: keep unlock_post inlined in hot path
  io_uring: don't use complete_post in kbuf
  io_uring: spelling fix
  io_uring: remove io_req_complete_post_tw
  io_uring: allow multishot polled reqs to defer completion
  io_uring: remove overflow param from io_post_aux_cqe
  io_uring: add lockdep assertion in io_fill_cqe_aux
  io_uring: make io_fill_cqe_aux static
  io_uring: add io_aux_cqe which allows deferred completion
  io_uring: allow defer completion for aux posted cqes
  io_uring: defer all io_req_complete_failed
  io_uring: always lock in io_apoll_task_func
  io_uring: remove iopoll spinlock
  io_uring: iopoll protect complete_post
  io_uring: inline __io_req_complete_put()
  io_uring: remove io_req_tw_post_queue
  io_uring: use io_req_task_complete() in timeout
  io_uring: hold locks for io_req_complete_failed
  io_uring: add completion locking for iopoll
  io_uring: kill io_cqring_ev_posted() and __io_cq_unlock_post()
  ...
</content>
</entry>
</feed>
