<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux-stable.git/drivers/vdpa, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.landau.one/pub/scm/linux/kernel/git/stable/linux-stable.git/atom?h=master</id>
<link rel='self' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux-stable.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux-stable.git/'/>
<updated>2026-09-08T07:58:27+00:00</updated>
<entry>
<title>vduse: return compat ioctl results directly</title>
<updated>2026-09-08T07:58:27+00:00</updated>
<author>
<name>Linfeng Sun</name>
<email>linfeng.sun.dev@gmail.com</email>
</author>
<published>2026-09-08T07:31:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=48a4ee65e677559776349128e6a81a6041986c99'/>
<id>urn:sha1:48a4ee65e677559776349128e6a81a6041986c99</id>
<content type='text'>
The compat handler handles VDUSE_IOTLB_GET_FD and VDUSE_VQ_GET_INFO, but
then calls the native handler. Their different command sizes make native
dispatch return -ENOIOCTLCMD.

For GET_FD, this overwrites receive_fd()'s return value after the
descriptor is installed, leaking one fd per call. Return handled compat
results directly and use native dispatch only for other commands.

Fixes: 455a2a1af926 ("vduse: fix compat handling for VDUSE_IOTLB_GET_FD/VDUSE_VQ_GET_INFO")
Signed-off-by: Linfeng Sun &lt;linfeng.sun.dev@gmail.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-ID: &lt;20260908-fix-vduse_dev_compat_ioctl-v1-1-62264d9bfb8d@gmail.com&gt;
</content>
</entry>
<entry>
<title>vduse: validate virtqueue alignment</title>
<updated>2026-09-07T22:54:04+00:00</updated>
<author>
<name>Jia Jia</name>
<email>physicalmtea@gmail.com</email>
</author>
<published>2026-08-30T02:33:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=fa2c25b4add57888acfa89e398389e267bff3dcf'/>
<id>urn:sha1:fa2c25b4add57888acfa89e398389e267bff3dcf</id>
<content type='text'>
vduse_validate_config() only checks the upper bound of vq_align. Invalid
values can therefore reach vring_create_virtqueue_map(). The split-ring
helpers use align - 1 as a bit mask, so the alignment must be a non-zero
power of two. A zero value makes vring_size() drop the descriptor and
available-ring part and vring_init() leave the used ring pointer NULL.

The VIRTIO spec requires the used ring to start at an address
aligned to at least 4 bytes. Reject values below VRING_USED_ALIGN_SIZE as
well as non-power-of-two values before they reach the virtio ring helpers.

Opening a virtio-net device created with vq_align=0 triggered:

BUG: KASAN: null-ptr-deref in virtqueue_kick_prepare_split+0xe3/0x100
Read of size 2 at addr 0000000000000000 by task systemd-network/1062

Call Trace (relevant frames):
 dump_stack_lvl
 print_report
 kasan_report
 __asan_load2
 virtqueue_kick_prepare_split+0xe3/0x100
 virtqueue_kick_prepare+0x40/0x60
 try_fill_recv+0x857/0x1250
 virtnet_open+0x189/0x460
 __dev_open+0x225/0x390
 __dev_change_flags+0x368/0x3b0
 netif_change_flags+0x56/0xc0
 do_setlink.isra.0+0x68c/0x1e30

Validate the value before it reaches the virtio ring helpers.

Fixes: c8a6153b6c59 ("vduse: Introduce VDUSE - vDPA Device in Userspace")
Signed-off-by: Jia Jia &lt;physicalmtea@gmail.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-ID: &lt;20260830023354.115333-1-physicalmtea@gmail.com&gt;
</content>
</entry>
<entry>
<title>vduse: do not take dev-&gt;rwsem in the virtqueue kick path</title>
<updated>2026-09-07T22:54:04+00:00</updated>
<author>
<name>Nikhil</name>
<email>nikhilljatt@gmail.com</email>
</author>
<published>2026-08-29T22:54:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=7474f3a61043934e9c351febc56f4d85cd5ddc96'/>
<id>urn:sha1:7474f3a61043934e9c351febc56f4d85cd5ddc96</id>
<content type='text'>
vduse_vq_kick() runs in the context of the vdpa .kick_vq callback. With
the virtio_vdpa bus driver that callback is invoked by virtqueue_notify()
from the virtio device driver, which may be an atomic context: virtio-blk
kicks from -&gt;queue_rq(), which blk-mq dispatches under rcu_read_lock()
(the tag set does not use BLK_MQ_F_BLOCKING), and virtio-net kicks from
its xmit path with the tx queue lock held.

Commit b282418bc366 ("vduse: Add suspend") made vduse_vq_kick() take
dev-&gt;rwsem for reading in order to check dev-&gt;suspended. down_read() may
sleep, so with CONFIG_DEBUG_ATOMIC_SLEEP the first I/O on a VDUSE-backed
virtio-blk device bound to virtio_vdpa now triggers:

  BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1573
  in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 27, name: kworker/1:0H
  preempt_count: 0, expected: 0
  RCU nest depth: 1, expected: 0
  3 locks held by kworker/1:0H/27:
   #0: ((wq_completion)kblockd){+.+.}-{0:0}, at: process_one_work+0xac7/0xcf0
   #1: ((work_completion)(&amp;(&amp;hctx-&gt;run_work)-&gt;work)){+.+.}-{0:0}, at: process_one_work+0x51f/0xcf0
   #2: (rcu_read_lock){....}-{1:3}, at: blk_mq_run_work_fn+0x119/0x220
  Workqueue: kblockd blk_mq_run_work_fn
  Call Trace:
   &lt;TASK&gt;
   dump_stack_lvl+0x80/0xa0
   __might_resched+0x231/0x370
   down_read+0x73/0x330
   vduse_vq_kick+0x30/0x120
   virtio_vdpa_notify+0x63/0x80
   virtqueue_notify+0x45/0x70
   virtio_queue_rq+0x19d/0x300
   blk_mq_dispatch_rq_list+0x269/0xe20
   __blk_mq_sched_dispatch_requests+0x761/0xa60
   blk_mq_sched_dispatch_requests+0x6b/0xc0
   blk_mq_run_work_fn+0x143/0x220
   process_one_work+0x581/0xcf0
   worker_thread+0x2fc/0x5a0
   kthread+0x1cc/0x210
   ret_from_fork+0x3c4/0x540
   ret_from_fork_asm+0x1a/0x30
   &lt;/TASK&gt;

Without CONFIG_DEBUG_ATOMIC_SLEEP, a kick that finds the rwsem
write-locked by vduse_dev_reset() or vduse_vdpa_suspend() blocks inside
an RCU read-side critical section. The vhost_vdpa path kicks from the
vhost worker, i.e. process context, which is why this went unnoticed.

Check dev-&gt;suspended under vq-&gt;kick_lock instead, which the kick path
already takes, and have vduse_vdpa_suspend() cycle every virtqueue's
kick_lock after setting the flag. A kick that observed suspended == false
has thus finished signalling before suspend returns, which is the
guarantee the rwsem used to provide. The flag is now also read outside
the rwsem, so access it with READ_ONCE()/WRITE_ONCE().

Fixes: b282418bc366 ("vduse: Add suspend")
Signed-off-by: Nikhil &lt;nikhilljatt@gmail.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-ID: &lt;20260829225457.1037867-1-nikhilljatt@gmail.com&gt;
</content>
</entry>
<entry>
<title>vdpa_sim_net: check TX pull result before RX copy</title>
<updated>2026-09-07T22:54:03+00:00</updated>
<author>
<name>Linfeng Sun</name>
<email>linfeng.sun.dev@gmail.com</email>
</author>
<published>2026-09-01T09:48:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=0d195797a80b77f2ec56718cd26d3ee65d0093e8'/>
<id>urn:sha1:0d195797a80b77f2ec56718cd26d3ee65d0093e8</id>
<content type='text'>
vringh_iov_pull_iotlb() returns a signed byte count.  A failed TX pull is
currently added to the unsigned byte counter and then passed as a size_t
length to receive_filter() and vringh_iov_push_iotlb().  A negative error
can therefore become a large length in the RX path.

Handle non-positive pull results before every length use.  Count the TX
error and complete the consumed TX descriptor with zero bytes.

I found this bug myself, though the patch was written with AI assistance.

Fixes: cfe226892913 ("vdpa_sim: filter destination mac address")
Assisted-by: OpenAI-Codex:GPT-5
Signed-off-by: Linfeng Sun &lt;linfeng.sun.dev@gmail.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-ID: &lt;20260901094842.25875-1-linfeng.sun.dev@gmail.com&gt;
</content>
</entry>
<entry>
<title>vdpa_sim_blk: reject out-of-range sector starts</title>
<updated>2026-09-07T22:54:03+00:00</updated>
<author>
<name>Linfeng Sun</name>
<email>linfeng.sun.dev@gmail.com</email>
</author>
<published>2026-09-01T09:48:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=0a8693f00c408d85f086ad85d29e7030bf1e2055'/>
<id>urn:sha1:0a8693f00c408d85f086ad85d29e7030bf1e2055</id>
<content type='text'>
vdpasim_blk_check_range() logs an invalid start sector but continues
validating the request.  The subsequent unsigned capacity subtraction can
underflow and let an out-of-range buffer offset reach the data path.

The invalid offset is used by three request paths.  VIRTIO_BLK_T_OUT
copies guest data to blk-&gt;buffer + offset through
vringh_iov_pull_iotlb(), causing an out-of-bounds write in
_copy_from_iter() or memcpy().  VIRTIO_BLK_T_IN copies from
blk-&gt;buffer + offset to the guest through vringh_iov_push_iotlb(),
causing an out-of-bounds read in _copy_to_iter().
VIRTIO_BLK_T_WRITE_ZEROES passes blk-&gt;buffer + offset to memset(),
causing an out-of-bounds write.

Reject starts at or beyond the capacity before the subtraction.  Treat the
capacity boundary as invalid because the IN and OUT paths round byte counts
down to sectors for validation but later copy the original byte counts.  A
sub-sector request at the capacity boundary would otherwise still access
past the end of the buffer.

I found this bug myself, though the patch was written with AI assistance.

Fixes: 7d189f617f83 ("vdpa_sim_blk: implement ramdisk behaviour")
Assisted-by: OpenAI-Codex:GPT-5
Signed-off-by: Linfeng Sun &lt;linfeng.sun.dev@gmail.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-ID: &lt;20260901094800.25475-1-linfeng.sun.dev@gmail.com&gt;
</content>
</entry>
<entry>
<title>vdpa: octeon_ep: Check dev_set_name() in dev add</title>
<updated>2026-09-07T22:54:03+00:00</updated>
<author>
<name>Xiong Weimin</name>
<email>xiongweimin@kylinos.cn</email>
</author>
<published>2026-08-04T09:26:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=6519ca235131c3281a83cc9e8b05af709ab98a89'/>
<id>urn:sha1:6519ca235131c3281a83cc9e8b05af709ab98a89</id>
<content type='text'>
Handle dev_set_name() failures before registering the vDPA device so
allocation is unwound through the existing put_device() path.

Signed-off-by: Xiong Weimin &lt;xiongweimin@kylinos.cn&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-ID: &lt;20260804092636.1344431-1-xiongweimin@kylinos.cn&gt;
</content>
</entry>
<entry>
<title>vdpa: ifcvf: Put device on unsupported feature error</title>
<updated>2026-09-07T22:54:02+00:00</updated>
<author>
<name>Xiong Weimin</name>
<email>xiongweimin@kylinos.cn</email>
</author>
<published>2026-08-05T01:51:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=4d470be71196ca0ce302e6623454533dc31b465b'/>
<id>urn:sha1:4d470be71196ca0ce302e6623454533dc31b465b</id>
<content type='text'>
Route unsupported provisioned features through the common error path after
vdpa_alloc_device() so the allocated device and adapter pointer are
released consistently.

Fixes: 46fc0917bbab ("vDPA/ifcvf: implement features provisioning")
Cc: stable@vger.kernel.org # v6.3+
Signed-off-by: Xiong Weimin &lt;xiongweimin@kylinos.cn&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-ID: &lt;178589471294.1556376.4816776800128323034@kylinos.cn&gt;
</content>
</entry>
<entry>
<title>vdpa: solidrun: Free IRQs after request failure</title>
<updated>2026-09-07T22:54:02+00:00</updated>
<author>
<name>Xiong Weimin</name>
<email>xiongweimin@kylinos.cn</email>
</author>
<published>2026-08-05T01:51:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=e847542ab0545c73354849126150206c29d83929'/>
<id>urn:sha1:e847542ab0545c73354849126150206c29d83929</id>
<content type='text'>
Unwind IRQs already requested by snet_request_irqs() before returning a
VQ IRQ request error so a later DRIVER_OK retry starts from a clean
state. The IRQs are requested and freed while the PCI device remains
bound, so the driver cannot wait for devres cleanup at detach time.

Fixes: 51a8f9d7f587 ("virtio: vdpa: new SolidNET DPU driver.")
Cc: stable@vger.kernel.org # v6.3+
Signed-off-by: Xiong Weimin &lt;xiongweimin@kylinos.cn&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-ID: &lt;178589471328.1556376.15570536900532373521@kylinos.cn&gt;
</content>
</entry>
<entry>
<title>vdpa: alibaba: Keep DRIVER_OK clear if IRQ setup fails</title>
<updated>2026-09-07T22:54:02+00:00</updated>
<author>
<name>Xiong Weimin</name>
<email>xiongweimin@kylinos.cn</email>
</author>
<published>2026-08-04T09:26:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=9ab9b4f4eb4288588707ec359ac3d5b7ccf07fa6'/>
<id>urn:sha1:9ab9b4f4eb4288588707ec359ac3d5b7ccf07fa6</id>
<content type='text'>
If requesting MSI-X interrupts fails while DRIVER_OK is being set, leave
the device status unchanged instead of advertising a ready device without
working interrupts.

Signed-off-by: Xiong Weimin &lt;xiongweimin@kylinos.cn&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-ID: &lt;20260804092608.1344269-1-xiongweimin@kylinos.cn&gt;
</content>
</entry>
<entry>
<title>vdpa/pds: check virtqueue notify mapping</title>
<updated>2026-09-07T22:54:02+00:00</updated>
<author>
<name>Xiong Weimin</name>
<email>xiongweimin@kylinos.cn</email>
</author>
<published>2026-08-06T00:58:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=6601d5a00899e7fa7e6b2d18113cee385ed3801b'/>
<id>urn:sha1:6601d5a00899e7fa7e6b2d18113cee385ed3801b</id>
<content type='text'>
vp_modern_map_vq_notify() can fail and return NULL.  Check the notify
mapping while adding a pds vDPA device and use the existing teardown path
instead of storing a NULL doorbell pointer in the virtqueue state.

Signed-off-by: Xiong Weimin &lt;xiongweimin@kylinos.cn&gt;
Reviewed-by: Brett Creeley &lt;brett.creeley@amd.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-ID: &lt;20260806005809.1875257-1-xiongweimin@kylinos.cn&gt;
</content>
</entry>
</feed>
