From: Alyssa Ross <hi@alyssa.is>
To: SamiUddinsami.md.ko@gmail.com
Cc: mst@redhat.com, jasowang@redhat.com, xuanzhuo@linux.alibaba.com,
eperezma@redhat.com, virtualization@lists.linux.dev,
linux-kernel@vger.kernel.org, Sami Uddin <sami.md.ko@gmail.com>,
regressions@lists.linux.dev
Subject: Re: [REGRESSION] virtio: reject shm region if length is zero
Date: Fri, 15 Aug 2025 21:19:34 +0200 [thread overview]
Message-ID: <87y0rkie9l.fsf@alyssa.is> (raw)
In-Reply-To: <kgasjsq2s4pshravsinycfihdfjhdts5iz2fox42aejs4xqhce@frurksambnk3>
[-- Attachment #1: Type: text/plain, Size: 1969 bytes --]
Alyssa Ross <hi@alyssa.is> writes:
> On Mon, May 12, 2025 at 07:51:53AM +0930, SamiUddinsami.md.ko@gmail.com wrote:
>> From: Sami Uddin <sami.md.ko@gmail.com>
>>
>> Prevent usage of shared memory regions where the length is zero,
>> as such configurations are not valid and may lead to unexpected behavior.
>>
>> Signed-off-by: Sami Uddin <sami.md.ko@gmail.com>
>> ---
>> v3:
>> - Use idiomatic 'if (!region->len)' as suggested by reviewer
>> v2:
>> - Fixed coding style issue: added space after 'if' statement
>>
>> include/linux/virtio_config.h | 2 ++
>> 1 file changed, 2 insertions(+)
>
> Hi, I'm sorry to be the bearer of bad news, but since this patch my VM
> no longer works. The system is running wayland-proxy-virtwl[1] inside
> a crosvm[2] VM, using crosvm's virtio-gpu device to do cross-domain
> Wayland forwarding.
>
> Since this change, wayland-proxy-virtwl crashes with the following log
> message:
>
> wl-proxy [WARNING]: Error handling client: Unix.Unix_error(Unix.EINVAL, "DRM_IOCTL_VIRTGPU_RESOURCE_CREATE_BLOB", "")
>
> I'm pretty confused by what this change was supposed to do in the first
> place… Looking at how virtio_get_shm_region() is used in
> virtio_gpu_init(), it's called with a pointer to zeroed memory, and then
> the get_shm_region() implementation is supposed to write to the region,
> without ever reading from it as far as I can tell. Why is the initial
> value of an out parameter being checked at all? How does this prevent
> using zero-length shared memory regions?
>
> [1]: https://crosvm.dev/
> [2]: https://github.com/talex5/wayland-proxy-virtwl
>
> #regzbot introduced: 206cc44588f72b49ad4d7e21a7472ab2a72a83df
Okay, just found that it's already been reverted:
https://lore.kernel.org/all/20250808072533-mutt-send-email-mst@kernel.org/
Still, I'm confused how this was supposed to fix anything…
#regzbot fix: Revert "virtio: reject shm region if length is zero"
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
next prev parent reply other threads:[~2025-08-15 19:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-11 22:21 [PATCH v3] virtio: reject shm region if length is zero Sami
2025-05-14 6:08 ` Jason Wang
2025-08-15 19:09 ` [REGRESSION] " Alyssa Ross
2025-08-15 19:19 ` Alyssa Ross [this message]
2025-08-16 10:36 ` Michael S. Tsirkin
2025-08-16 11:05 ` Alyssa Ross
2025-08-16 11:16 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y0rkie9l.fsf@alyssa.is \
--to=hi@alyssa.is \
--cc=SamiUddinsami.md.ko@gmail.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=regressions@lists.linux.dev \
--cc=sami.md.ko@gmail.com \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox