<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/io_uring, branch v6.13</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.13</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.13'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-01-17T01:02:28Z</updated>
<entry>
<title>Merge tag 'io_uring-6.13-20250116' of git://git.kernel.dk/linux</title>
<updated>2025-01-17T01:02:28Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-01-17T01:02:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a634dda26186cf9a51567020fcce52bcba5e1e59'/>
<id>urn:sha1:a634dda26186cf9a51567020fcce52bcba5e1e59</id>
<content type='text'>
Pull io_uring fixes from Jens Axboe:
 "One fix for the error handling in buffer cloning, and one fix for the
  ring resizing.

  Two minor followups for the latter as well.

  Both of these issues only affect 6.13, so not marked for stable"

* tag 'io_uring-6.13-20250116' of git://git.kernel.dk/linux:
  io_uring/register: cache old SQ/CQ head reading for copies
  io_uring/register: document io_register_resize_rings() shared mem usage
  io_uring/register: use stable SQ/CQ ring data during resize
  io_uring/rsrc: fixup io_clone_buffers() error handling
</content>
</entry>
<entry>
<title>io_uring/register: cache old SQ/CQ head reading for copies</title>
<updated>2025-01-15T15:39:15Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2025-01-15T15:39:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6f7a644eb7db10f9993039bab7740f7982d4edf4'/>
<id>urn:sha1:6f7a644eb7db10f9993039bab7740f7982d4edf4</id>
<content type='text'>
The SQ and CQ ring heads are read twice - once for verifying that it's
within bounds, and once inside the loops copying SQE and CQE entries.
This is technically incorrect, in case the values could get modified
in between verifying them and using them in the copy loop. While this
won't lead to anything truly nefarious, it may cause longer loop times
for the copies than expected.

Read the ring head values once, and use the verified value in the copy
loops.

Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring/register: document io_register_resize_rings() shared mem usage</title>
<updated>2025-01-15T15:34:03Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2025-01-15T15:23:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2c5aae129f427f83eeba5efbfb4e60a777cd073c'/>
<id>urn:sha1:2c5aae129f427f83eeba5efbfb4e60a777cd073c</id>
<content type='text'>
It can be a bit hard to tell which parts of io_register_resize_rings()
are operating on shared memory, and which ones are not. And anything
reading or writing to those regions should really use the read/write
once primitives.

Hence add those, ensuring sanity in how this memory is accessed, and
helping document the shared nature of it.

Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring/register: use stable SQ/CQ ring data during resize</title>
<updated>2025-01-15T14:45:47Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2025-01-15T14:39:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8911798d3e8a9624b1acf2882c7a0183694d714d'/>
<id>urn:sha1:8911798d3e8a9624b1acf2882c7a0183694d714d</id>
<content type='text'>
Normally the kernel would not expect an application to modify any of
the data shared with the kernel during a resize operation, but of
course the kernel cannot always assume good intent on behalf of the
application.

As part of resizing the rings, existing SQEs and CQEs are copied over
to the new storage. Resizing uses the masks in the newly allocated
shared storage to index the arrays, however it's possible that malicious
userspace could modify these after they have been sanity checked.

Use the validated and locally stored CQ and SQ ring sizing for masking
to ensure the values are both stable and valid.

Fixes: 79cfe9e59c2a ("io_uring/register: add IORING_REGISTER_RESIZE_RINGS")
Reported-by: Jann Horn &lt;jannh@google.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring/rsrc: fixup io_clone_buffers() error handling</title>
<updated>2025-01-14T16:44:21Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2025-01-14T16:44:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c1c03ee7957ec178756cae09c39d77194e8cddb7'/>
<id>urn:sha1:c1c03ee7957ec178756cae09c39d77194e8cddb7</id>
<content type='text'>
Jann reports he can trigger a UAF if the target ring unregisters
buffers before the clone operation is fully done. And additionally
also an issue related to node allocation failures. Both of those
stemp from the fact that the cleanup logic puts the buffers manually,
rather than just relying on io_rsrc_data_free() doing it. Hence kill
the manual cleanup code and just let io_rsrc_data_free() handle it,
it'll put the nodes appropriately.

Reported-by: Jann Horn &lt;jannh@google.com&gt;
Fixes: 3597f2786b68 ("io_uring/rsrc: unify file and buffer resource tables")
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>Merge tag 'io_uring-6.13-20250111' of git://git.kernel.dk/linux</title>
<updated>2025-01-11T18:59:43Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-01-11T18:59:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=52a5a22d8afe3bd195f7b470c7535c63717f5ff7'/>
<id>urn:sha1:52a5a22d8afe3bd195f7b470c7535c63717f5ff7</id>
<content type='text'>
Pull io_uring fixes from Jens Axboe:

 - Fix for multishot timeout updates only using the updated value for
   the first invocation, not subsequent ones

 - Silence a false positive lockdep warning

 - Fix the eventfd signaling and putting RCU logic

 - Fix fault injected SQPOLL setup not clearing the task pointer in the
   error path

 - Fix local task_work looking at the SQPOLL thread rather than just
   signaling the safe variant. Again one of those theoretical issues,
   which should be closed up none the less.

* tag 'io_uring-6.13-20250111' of git://git.kernel.dk/linux:
  io_uring: don't touch sqd-&gt;thread off tw add
  io_uring/sqpoll: zero sqd-&gt;thread on tctx errors
  io_uring/eventfd: ensure io_eventfd_signal() defers another RCU period
  io_uring: silence false positive warnings
  io_uring/timeout: fix multishot updates
</content>
</entry>
<entry>
<title>io_uring: don't touch sqd-&gt;thread off tw add</title>
<updated>2025-01-10T21:00:25Z</updated>
<author>
<name>Pavel Begunkov</name>
<email>asml.silence@gmail.com</email>
</author>
<published>2025-01-10T20:36:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bd2703b42decebdcddf76e277ba76b4c4a142d73'/>
<id>urn:sha1:bd2703b42decebdcddf76e277ba76b4c4a142d73</id>
<content type='text'>
With IORING_SETUP_SQPOLL all requests are created by the SQPOLL task,
which means that req-&gt;task should always match sqd-&gt;thread. Since
accesses to sqd-&gt;thread should be separately protected, use req-&gt;task
in io_req_normal_work_add() instead.

Note, in the eyes of io_req_normal_work_add(), the SQPOLL task struct
is always pinned and alive, and sqd-&gt;thread can either be the task or
NULL. It's only problematic if the compiler decides to reload the value
after the null check, which is not so likely.

Cc: stable@vger.kernel.org
Cc: Bui Quang Minh &lt;minhquangbui99@gmail.com&gt;
Reported-by: lizetao &lt;lizetao1@huawei.com&gt;
Fixes: 78f9b61bd8e54 ("io_uring: wake SQPOLL task when task_work is added to an empty queue")
Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/1cbbe72cf32c45a8fee96026463024cd8564a7d7.1736541357.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring/sqpoll: zero sqd-&gt;thread on tctx errors</title>
<updated>2025-01-10T21:00:19Z</updated>
<author>
<name>Pavel Begunkov</name>
<email>asml.silence@gmail.com</email>
</author>
<published>2025-01-10T14:31:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4b7cfa8b6c28a9fa22b86894166a1a34f6d630ba'/>
<id>urn:sha1:4b7cfa8b6c28a9fa22b86894166a1a34f6d630ba</id>
<content type='text'>
Syzkeller reports:

BUG: KASAN: slab-use-after-free in thread_group_cputime+0x409/0x700 kernel/sched/cputime.c:341
Read of size 8 at addr ffff88803578c510 by task syz.2.3223/27552
 Call Trace:
  &lt;TASK&gt;
  ...
  kasan_report+0x143/0x180 mm/kasan/report.c:602
  thread_group_cputime+0x409/0x700 kernel/sched/cputime.c:341
  thread_group_cputime_adjusted+0xa6/0x340 kernel/sched/cputime.c:639
  getrusage+0x1000/0x1340 kernel/sys.c:1863
  io_uring_show_fdinfo+0xdfe/0x1770 io_uring/fdinfo.c:197
  seq_show+0x608/0x770 fs/proc/fd.c:68
  ...

That's due to sqd-&gt;task not being cleared properly in cases where
SQPOLL task tctx setup fails, which can essentially only happen with
fault injection to insert allocation errors.

Cc: stable@vger.kernel.org
Fixes: 1251d2025c3e1 ("io_uring/sqpoll: early exit thread if task_context wasn't allocated")
Reported-by: syzbot+3d92cfcfa84070b0a470@syzkaller.appspotmail.com
Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/efc7ec7010784463b2e7466d7b5c02c2cb381635.1736519461.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>Merge tag 'vfs-6.13-rc7.fixes.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs</title>
<updated>2025-01-10T17:11:11Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-01-10T17:11:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7110f24f9e33979fd704f7a4a595a9d3e9bdacb7'/>
<id>urn:sha1:7110f24f9e33979fd704f7a4a595a9d3e9bdacb7</id>
<content type='text'>
Pull vfs fixes from Christian Brauner:
 "afs:

   - Fix the maximum cell name length

   - Fix merge preference rule failure condition

  fuse:

   - Fix fuse_get_user_pages() so it doesn't risk misleading the caller
     to think pages have been allocated when they actually haven't

   - Fix direct-io folio offset and length calculation

  netfs:

   - Fix async direct-io handling

   - Fix read-retry for filesystems that don't provide a
     -&gt;prepare_read() method

  vfs:

   - Prevent truncating 64-bit offsets to 32-bits in iomap

   - Fix memory barrier interactions when polling

   - Remove MNT_ONRB to fix concurrent modification of @mnt-&gt;mnt_flags
     leading to MNT_ONRB to not be raised and invalid access to a list
     member"

* tag 'vfs-6.13-rc7.fixes.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  poll: kill poll_does_not_wait()
  sock_poll_wait: kill the no longer necessary barrier after poll_wait()
  io_uring_poll: kill the no longer necessary barrier after poll_wait()
  poll_wait: kill the obsolete wait_address check
  poll_wait: add mb() to fix theoretical race between waitqueue_active() and .poll()
  afs: Fix merge preference rule failure condition
  netfs: Fix read-retry for fs with no -&gt;prepare_read()
  netfs: Fix kernel async DIO
  fs: kill MNT_ONRB
  iomap: avoid avoid truncating 64-bit offset to 32 bits
  afs: Fix the maximum cell name length
  fuse: Set *nbytesp=0 in fuse_get_user_pages on allocation failure
  fuse: fix direct io folio offset and length calculation
</content>
</entry>
<entry>
<title>Merge branch 'vfs-6.14.poll' into vfs.fixes</title>
<updated>2025-01-10T11:01:21Z</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2025-01-10T11:01:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1623bc27a85a93e82194c8d077eccc464efa67db'/>
<id>urn:sha1:1623bc27a85a93e82194c8d077eccc464efa67db</id>
<content type='text'>
Bring in the fixes for __pollwait() and waitqueue_active() interactions.

Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
</feed>
