<feed xmlns='http://www.w3.org/2005/Atom'>
<title>passt/virtio.c, branch 2026_12_04.a39d958</title>
<subtitle>Plug A Simple Socket Transport</subtitle>
<link rel='alternate' type='text/html' href='https://passt.top/passt/'/>
<entry>
<title>virtio: Limit number of mapped iovec entries to maximum available entries</title>
<updated>2026-10-14T05:31:04+00:00</updated>
<author>
<name>Sithum Shihara</name>
<email>zaara98zaara@gmail.com</email>
</author>
<published>2026-10-10T06:33:54+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=265a9f96ef3cfa54d2b66ec74e60a8152c6bb0ab'/>
<id>265a9f96ef3cfa54d2b66ec74e60a8152c6bb0ab</id>
<content type='text'>
Based on an original patch and investigation by Sithum Shihara: limit
the number of host iovec entries we use to map guest descriptors to
the bound provided to virtqueue_map_desc().

If we don't, Sithum reports, on the vu_handle_tx() path, we can exceed
the VIRTQUEUE_MAX_SIZE limit for the out_sg array, with some very
specific configurations of memory regions. This is harmless as we
could only manage to write one additional entry, 16 bytes (the size
of a struct iovec), which invariably ends up into padding memory.

This is however definitely not intended, and could potentially turn
into robustness issues, even though we couldn't demonstrate any
availability impact either, as the FORTIFY_SOURCE checks don't trigger
here, because the virtqueue_map_desc() loop uses a direct assignment.

We tried to achieve larger writes, which, in theory, we could try to
obtain by having multiple exceeding iovec entries (not just 1), but,
in practice, without modifying QEMU sources, we couldn't achieve the
desired QEMU configuration and the submission of that kind of guest
descriptor.

However, as an abundance of caution, we considered what could happen
if we had achieved that.

Sticking to vu_handle_tx() as a caller, which appears to be the only
interesting case, the size of the worst-case write would correspond
to 30 split iovec entries, of 16 bytes each (struct iovec), that is,
480 bytes.

Out of those, 256 bytes would be written to the padding area, and we
would be left with 224 bytes that can overwrite up to 7 'elem' entries
(and we would need to cross 16 boundaries to reach this point, which,
as stated, appears unlikely to be achievable).

The values written into these 'elem' array would be corrupted in a
specific, predictable way, as they are the return values of
vu_gpa_to_va(), but, relevantly, not of the first 8 unintended calls
(because those results are written to the padding area), and, as a
result, the guest can't control their values, because the 'len'
parameter for the non-first calls is fixed and corresponding to the
size of the memory regions.

We couldn't find any writing pattern for those entries, provided a
given starting 'pa' argument, that would generate a valid 'index'
field as a result.

The resulting values of these 7 'elem' entries can't be used as a
vector to achieve arbitrary code execution either (not claimed by
Sithum, and we also failed to achieve this), because they don't
contain any pointer to be executed, and they can't possibly be used
for heap spraying because they can't be possibly written to any heap
area (passt doesn't do dynamic memory allocation).

We looked into other calling paths for virtqueue_map_desc() as well,
but couldn't find any way to trigger a similar out-of-bound write,
because they all have external or internal bounds that prevent or
limit the iovec entry overflow (to the point where we don't even reach
the 'elem' array).

Regardless of that, add the missing check for correctness and
robustness. Ideally, we would have liked to have a rate-limited
warning here, to avoid the risk of a malicious guest flooding the
logs, but the call path from where we could obtain a current timestamp
is rather long, and we don't expect this configuration to be actually
used in any practical setup: stick to a debug() call for simplicity.

We would like to thank Sithum Shihara for the precious and insightful
investigation, and for sharing his results in a very clear and honest
way.

Reported-by: Sithum Shihara &lt;zaara98zaara@gmail.com&gt;
Analysed-by: Sithum Shihara &lt;zaara98zaara@gmail.com&gt;
Fixes: 7d1cd4dbf503 ("vhost-user: introduce virtio API")
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Based on an original patch and investigation by Sithum Shihara: limit
the number of host iovec entries we use to map guest descriptors to
the bound provided to virtqueue_map_desc().

If we don't, Sithum reports, on the vu_handle_tx() path, we can exceed
the VIRTQUEUE_MAX_SIZE limit for the out_sg array, with some very
specific configurations of memory regions. This is harmless as we
could only manage to write one additional entry, 16 bytes (the size
of a struct iovec), which invariably ends up into padding memory.

This is however definitely not intended, and could potentially turn
into robustness issues, even though we couldn't demonstrate any
availability impact either, as the FORTIFY_SOURCE checks don't trigger
here, because the virtqueue_map_desc() loop uses a direct assignment.

We tried to achieve larger writes, which, in theory, we could try to
obtain by having multiple exceeding iovec entries (not just 1), but,
in practice, without modifying QEMU sources, we couldn't achieve the
desired QEMU configuration and the submission of that kind of guest
descriptor.

However, as an abundance of caution, we considered what could happen
if we had achieved that.

Sticking to vu_handle_tx() as a caller, which appears to be the only
interesting case, the size of the worst-case write would correspond
to 30 split iovec entries, of 16 bytes each (struct iovec), that is,
480 bytes.

Out of those, 256 bytes would be written to the padding area, and we
would be left with 224 bytes that can overwrite up to 7 'elem' entries
(and we would need to cross 16 boundaries to reach this point, which,
as stated, appears unlikely to be achievable).

The values written into these 'elem' array would be corrupted in a
specific, predictable way, as they are the return values of
vu_gpa_to_va(), but, relevantly, not of the first 8 unintended calls
(because those results are written to the padding area), and, as a
result, the guest can't control their values, because the 'len'
parameter for the non-first calls is fixed and corresponding to the
size of the memory regions.

We couldn't find any writing pattern for those entries, provided a
given starting 'pa' argument, that would generate a valid 'index'
field as a result.

The resulting values of these 7 'elem' entries can't be used as a
vector to achieve arbitrary code execution either (not claimed by
Sithum, and we also failed to achieve this), because they don't
contain any pointer to be executed, and they can't possibly be used
for heap spraying because they can't be possibly written to any heap
area (passt doesn't do dynamic memory allocation).

We looked into other calling paths for virtqueue_map_desc() as well,
but couldn't find any way to trigger a similar out-of-bound write,
because they all have external or internal bounds that prevent or
limit the iovec entry overflow (to the point where we don't even reach
the 'elem' array).

Regardless of that, add the missing check for correctness and
robustness. Ideally, we would have liked to have a rate-limited
warning here, to avoid the risk of a malicious guest flooding the
logs, but the call path from where we could obtain a current timestamp
is rather long, and we don't expect this configuration to be actually
used in any practical setup: stick to a debug() call for simplicity.

We would like to thank Sithum Shihara for the precious and insightful
investigation, and for sharing his results in a very clear and honest
way.

Reported-by: Sithum Shihara &lt;zaara98zaara@gmail.com&gt;
Analysed-by: Sithum Shihara &lt;zaara98zaara@gmail.com&gt;
Fixes: 7d1cd4dbf503 ("vhost-user: introduce virtio API")
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>virtio: Reduce scope of variable</title>
<updated>2026-05-11T22:03:57+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2026-05-11T10:03:16+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=5b3ca87079e7a356ba0036ebb0be0a37def35e38'/>
<id>5b3ca87079e7a356ba0036ebb0be0a37def35e38</id>
<content type='text'>
As cppcheck points out, the 'min' variable in vu_log_queue_fill() can have
its scope reduced.  Do so.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Reviewed-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As cppcheck points out, the 'min' variable in vu_log_queue_fill() can have
its scope reduced.  Do so.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Reviewed-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: Spell ASSERT() as assert()</title>
<updated>2026-03-20T20:05:29+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2026-03-19T06:11:43+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=bc872d91765dfd6ff34b0e9a34bce410fac1cef3'/>
<id>bc872d91765dfd6ff34b0e9a34bce410fac1cef3</id>
<content type='text'>
The standard library assert(3), at least with glibc, hits our seccomp
filter and dies with SIGSYS before it's able to print a message, making it
near useless.  Therefore, since 7a8ed9459dfe ("Make assertions actually
useful") we've instead used our own implementation, named ASSERT().

This makes our code look slightly odd though - ASSERT() has the same
overall effect as assert(), it's just a different implementation.  More
importantly this makes it awkward to share code between passt/pasta proper
and things that compile in a more typical environment.  We're going to want
that for our upcoming dynamic configuration tool.

Address this by overriding the standard library's assert() implementation
with our own, instead of giving ours its own name.

The standard assert() is supposed to be omitted if NDEBUG is defined,
which ours doesn't do.  Implement that as well, so ours doesn't
unexpectedly differ.  For the -DNDEBUG case we do this by *not* overriding
assert(), since it will be a no-op anyway.  This requires a few places to
add a #include &lt;assert.h&gt; to let us compile (albeit with warnings) when
-DNDEBUG.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
[sbrivio: Fix some conflicts and missing conversions as a result of
 applying "vu_common: Move iovec management into vu_collect()" first]
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The standard library assert(3), at least with glibc, hits our seccomp
filter and dies with SIGSYS before it's able to print a message, making it
near useless.  Therefore, since 7a8ed9459dfe ("Make assertions actually
useful") we've instead used our own implementation, named ASSERT().

This makes our code look slightly odd though - ASSERT() has the same
overall effect as assert(), it's just a different implementation.  More
importantly this makes it awkward to share code between passt/pasta proper
and things that compile in a more typical environment.  We're going to want
that for our upcoming dynamic configuration tool.

Address this by overriding the standard library's assert() implementation
with our own, instead of giving ours its own name.

The standard assert() is supposed to be omitted if NDEBUG is defined,
which ours doesn't do.  Implement that as well, so ours doesn't
unexpectedly differ.  For the -DNDEBUG case we do this by *not* overriding
assert(), since it will be a no-op anyway.  This requires a few places to
add a #include &lt;assert.h&gt; to let us compile (albeit with warnings) when
-DNDEBUG.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
[sbrivio: Fix some conflicts and missing conversions as a result of
 applying "vu_common: Move iovec management into vu_collect()" first]
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>virtio: Pass iovec arrays as separate parameters to vu_queue_pop()</title>
<updated>2026-03-20T19:05:12+00:00</updated>
<author>
<name>Laurent Vivier</name>
<email>lvivier@redhat.com</email>
</author>
<published>2026-03-18T09:19:39+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=b9d076d8af993359ec7cd2eb97572c1fe0675089'/>
<id>b9d076d8af993359ec7cd2eb97572c1fe0675089</id>
<content type='text'>
Currently vu_queue_pop() and vu_queue_map_desc() read the iovec arrays
(in_sg/out_sg) and their sizes (in_num/out_num) from the vu_virtq_element
struct.  This couples the iovec storage to the element, requiring callers
like vu_handle_tx() to pre-initialize the element fields before calling
vu_queue_pop().

Pass the iovec arrays and their maximum sizes as separate parameters
instead.  vu_queue_map_desc() now writes the actual descriptor count
and iovec pointers back into the element after mapping, rather than
using the element as both input and output.

This decouples the iovec storage from the element, which is a
prerequisite for multi-buffer support where a single frame can span
multiple virtqueue elements sharing a common iovec pool.

No functional change.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently vu_queue_pop() and vu_queue_map_desc() read the iovec arrays
(in_sg/out_sg) and their sizes (in_num/out_num) from the vu_virtq_element
struct.  This couples the iovec storage to the element, requiring callers
like vu_handle_tx() to pre-initialize the element fields before calling
vu_queue_pop().

Pass the iovec arrays and their maximum sizes as separate parameters
instead.  vu_queue_map_desc() now writes the actual descriptor count
and iovec pointers back into the element after mapping, rather than
using the element as both input and output.

This decouples the iovec storage from the element, which is a
prerequisite for multi-buffer support where a single frame can span
multiple virtqueue elements sharing a common iovec pool.

No functional change.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: Fix places where we incorrectly indented with spaces</title>
<updated>2026-01-11T00:31:50+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2026-01-09T04:09:22+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=b973f4a6cc50571f8375c60a7e511a77bcf5c202'/>
<id>b973f4a6cc50571f8375c60a7e511a77bcf5c202</id>
<content type='text'>
Had a moment to address this trivial issue.

The passt convention is to indent code with tabs (K&amp;R / kernel style).
However there were a handful of places where we used spaces instead.  Fix
them.

Link: https://bugs.passt.top/show_bug.cgi?id=135
Reported-by: Xun Gu &lt;xugu@redhat.com&gt;
Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Had a moment to address this trivial issue.

The passt convention is to indent code with tabs (K&amp;R / kernel style).
However there were a handful of places where we used spaces instead.  Fix
them.

Link: https://bugs.passt.top/show_bug.cgi?id=135
Reported-by: Xun Gu &lt;xugu@redhat.com&gt;
Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>packet: Refactor vhost-user memory region handling</title>
<updated>2025-09-03T18:43:48+00:00</updated>
<author>
<name>Laurent Vivier</name>
<email>lvivier@redhat.com</email>
</author>
<published>2025-09-02T07:52:52+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=3e43e1a36c2cf138552bf6dc4666ff9fe6e00448'/>
<id>3e43e1a36c2cf138552bf6dc4666ff9fe6e00448</id>
<content type='text'>
This patch refactors the handling of vhost-user memory regions by
introducing a new `struct vdev_memory` to encapsulate the regions
array and their count (`nregions`) within the main `vu_dev` structure.

This new `vdev_memory` structure is then passed to the packet pool by
re-using the existing `p-&gt;buf` field. A `p-&gt;buf_size` of 0 indicates
that `p-&gt;buf` holds a pointer to `struct vdev_memory` instead of a
regular packet buffer. A new helper, `get_vdev_memory()`, is added to
abstract this access pattern.

Previous implementation was using a marker at the end of the memory
regions array. We can now uses all the slots.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch refactors the handling of vhost-user memory regions by
introducing a new `struct vdev_memory` to encapsulate the regions
array and their count (`nregions`) within the main `vu_dev` structure.

This new `vdev_memory` structure is then passed to the packet pool by
re-using the existing `p-&gt;buf` field. A `p-&gt;buf_size` of 0 indicates
that `p-&gt;buf` holds a pointer to `struct vdev_memory` instead of a
regular packet buffer. A new helper, `get_vdev_memory()`, is added to
abstract this access pattern.

Previous implementation was using a marker at the end of the memory
regions array. We can now uses all the slots.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>style: Fix 'Return' comment style</title>
<updated>2025-07-18T17:19:24+00:00</updated>
<author>
<name>Laurent Vivier</name>
<email>lvivier@redhat.com</email>
</author>
<published>2025-06-20T09:36:41+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=9e0423e13541e8da657f46dff71e841f40ee7391'/>
<id>9e0423e13541e8da657f46dff71e841f40ee7391</id>
<content type='text'>
We always use imperative (no 'Returns:'), no tab after the ':' and
only one space, the first character is always lowercase.

This is fixed with:

 sed -i "s/Returns:/Return:/;s/Return:    /Return: /;s/Return:  */Return: /;s/Return: \([A-Z]\)/Return: \L\1/" *.[ch]

And manually updated to fix alignment of multiline comment and words
that must keep uppercase (like IPv4, TCP, UDP, Layer-4).

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We always use imperative (no 'Returns:'), no tab after the ':' and
only one space, the first character is always lowercase.

This is fixed with:

 sed -i "s/Returns:/Return:/;s/Return:    /Return: /;s/Return:  */Return: /;s/Return: \([A-Z]\)/Return: \L\1/" *.[ch]

And manually updated to fix alignment of multiline comment and words
that must keep uppercase (like IPv4, TCP, UDP, Layer-4).

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>virtio: Correct and align comment headers</title>
<updated>2025-05-16T16:27:11+00:00</updated>
<author>
<name>Laurent Vivier</name>
<email>lvivier@redhat.com</email>
</author>
<published>2025-05-16T12:42:27+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=b915375a421d70065baa90444da49954ceacde38'/>
<id>b915375a421d70065baa90444da49954ceacde38</id>
<content type='text'>
Standardize and fix issues in `virtio.c` and `virtio.h` comment headers.

Improvements include:
- Added `()` to function names in comment summaries.
- Added colons after parameter and enum member tags.
- Changed `/*` to `/**` for `virtq_avail_event()` comment.
- Fixed typos (e.g., "file"-&gt;"fill", "virqueue"-&gt;"virtqueue").
- Added missing `Return:` tag for `vu_queue_rewind()`.
- Corrected parameter names in `virtio.h` comments to match code.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Standardize and fix issues in `virtio.c` and `virtio.h` comment headers.

Improvements include:
- Added `()` to function names in comment summaries.
- Added colons after parameter and enum member tags.
- Changed `/*` to `/**` for `virtq_avail_event()` comment.
- Fixed typos (e.g., "file"-&gt;"fill", "virqueue"-&gt;"virtqueue").
- Added missing `Return:` tag for `vu_queue_rewind()`.
- Corrected parameter names in `virtio.h` comments to match code.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>virtio: Fix Clang warning (bugprone-sizeof-expression, cert-arr39-c)</title>
<updated>2025-05-14T15:51:32+00:00</updated>
<author>
<name>Laurent Vivier</name>
<email>lvivier@redhat.com</email>
</author>
<published>2025-05-13T09:41:00+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=a6b9832e495be636bcccf25e0aebdeb564addf06'/>
<id>a6b9832e495be636bcccf25e0aebdeb564addf06</id>
<content type='text'>
In `virtqueue_read_indirect_desc()`, the pointer arithmetic involving
`desc` is intentional. We add the length in bytes (`read_len`)
divided by the size of `struct vring_desc` to `desc`, which is
an array of `struct vring_desc`. This correctly calculates the
offset in terms of the number of `struct vring_desc` elements.

Clang issues the following warning due to this explicit scaling:

virtio.c:238:8: error: suspicious usage of 'sizeof(...)' in pointer
arithmetic; this scaled value will be scaled again by the '+='
operator [bugprone-sizeof-expression,cert-arr39-c,-Werror]
  238 |         desc += read_len / sizeof(struct vring_desc);
      |               ^            ~~~~~~~~~~~~~~~~~~~~~~~~~
virtio.c:238:8: note: '+=' in pointer arithmetic internally scales
with 'sizeof(struct vring_desc)' == 16

This behavior is intended, so the warning can be considered a
false positive in this context. The code correctly advances the
pointer by the desired number of descriptor entries.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In `virtqueue_read_indirect_desc()`, the pointer arithmetic involving
`desc` is intentional. We add the length in bytes (`read_len`)
divided by the size of `struct vring_desc` to `desc`, which is
an array of `struct vring_desc`. This correctly calculates the
offset in terms of the number of `struct vring_desc` elements.

Clang issues the following warning due to this explicit scaling:

virtio.c:238:8: error: suspicious usage of 'sizeof(...)' in pointer
arithmetic; this scaled value will be scaled again by the '+='
operator [bugprone-sizeof-expression,cert-arr39-c,-Werror]
  238 |         desc += read_len / sizeof(struct vring_desc);
      |               ^            ~~~~~~~~~~~~~~~~~~~~~~~~~
virtio.c:238:8: note: '+=' in pointer arithmetic internally scales
with 'sizeof(struct vring_desc)' == 16

This behavior is intended, so the warning can be considered a
false positive in this context. The code correctly advances the
pointer by the desired number of descriptor entries.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vhost_user: Don't export several functions</title>
<updated>2025-03-07T01:21:24+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2025-03-05T06:15:07+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=a83c806d1786fbe19bc6a3014f248e928e00651b'/>
<id>a83c806d1786fbe19bc6a3014f248e928e00651b</id>
<content type='text'>
vhost-user added several functions which are exposed in headers, but not
used outside the file where they're defined.  I can't tell if these are
really internal functions, or of they're logically supposed to be exported,
but we don't happen to have anything using them yet.

For the time being, just remove the exports.  We can add them back if we
need to.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vhost-user added several functions which are exposed in headers, but not
used outside the file where they're defined.  I can't tell if these are
really internal functions, or of they're logically supposed to be exported,
but we don't happen to have anything using them yet.

For the time being, just remove the exports.  We can add them back if we
need to.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
