All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Guo <guobin@linux.alibaba.com>
To: alex.bennee@linaro.org
Cc: mst@redhat.com, odaki@rsg.ci.i.u-tokyo.ac.jp,
	dmitry.osipenko@collabora.com, qemu-devel@nongnu.org
Subject: [PATCH 0/3] virtio-gpu: security, logging and UB fixes
Date: Wed, 24 Jun 2026 13:55:54 +0800	[thread overview]
Message-ID: <cover.1782270919.git.guobin@linux.alibaba.com> (raw)

Three small fixes for virtio-gpu, each independent:

1. Add resource validation to CTX_ATTACH/DETACH_RESOURCE handlers,
   resolving the long-standing "TODO add security" comments.

2. Replace three fprintf(stderr) calls with qemu_log_mask(LOG_GUEST_ERROR)
   and trace events, consistent with the rest of the virtio-gpu code.

3. Use unsigned shift (1U <<) for scanout_bitmask operations to avoid
   undefined behavior when the shift count could theoretically reach 31.

Bin Guo (3):
  virtio-gpu-virgl: validate resource existence on ctx attach/detach
  virtio-gpu-virgl: replace fprintf(stderr) with qemu_log_mask and trace
    events
  virtio-gpu: use unsigned shift for scanout bitmask operations

 hw/display/trace-events       |  2 ++
 hw/display/virtio-gpu-virgl.c | 33 +++++++++++++++++++++++----------
 hw/display/virtio-gpu.c       | 12 ++++++------
 3 files changed, 31 insertions(+), 16 deletions(-)

-- 
2.50.1 (Apple Git-155)



             reply	other threads:[~2026-06-24  5:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-24  5:55 Bin Guo [this message]
2026-06-24  5:55 ` [PATCH 1/3] virtio-gpu-virgl: validate resource existence on ctx attach/detach Bin Guo
2026-06-24  8:55   ` marcandre.lureau
2026-06-24  9:01   ` Akihiko Odaki
2026-06-24  5:55 ` [PATCH 2/3] virtio-gpu-virgl: replace fprintf(stderr) with qemu_log_mask and trace events Bin Guo
2026-06-24  8:38   ` Akihiko Odaki
2026-06-24  8:55   ` marcandre.lureau
2026-06-24  5:55 ` [PATCH 3/3] virtio-gpu: use unsigned shift for scanout bitmask operations Bin Guo
2026-06-24  8:34   ` Akihiko Odaki
2026-06-24  8:55   ` marcandre.lureau

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=cover.1782270919.git.guobin@linux.alibaba.com \
    --to=guobin@linux.alibaba.com \
    --cc=alex.bennee@linaro.org \
    --cc=dmitry.osipenko@collabora.com \
    --cc=mst@redhat.com \
    --cc=odaki@rsg.ci.i.u-tokyo.ac.jp \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.